Skip to content

Commit e64c41f

Browse files
committed
Sync documentation of main branch
1 parent 33b706a commit e64c41f

7 files changed

Lines changed: 655 additions & 17 deletions

File tree

_data/versioned/main/index/quarkus.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ types:
417417
url: /guides/opentelemetry
418418
- title: Using transactions in Quarkus
419419
filename: transaction.adoc
420-
summary: "The quarkus-narayana-jta extension provides a Transaction Manager that coordinates and expose transactions to your applications as described in the link: Jakarta Transactions specification, formerly known as Java Transaction API (JTA)."
420+
summary: "The quarkus-narayana-jta extension provides a Transaction Manager that coordinates and expose transactions to your applications as described in the Jakarta Transactions specification, formerly known as Java Transaction API (JTA)."
421421
categories: "data, getting-started"
422422
topics:
423423
- data
@@ -2343,6 +2343,19 @@ types:
23432343
- reactive
23442344
type: guide
23452345
url: /guides/quarkus-reactive-architecture
2346+
- title: Quarkus Signals
2347+
filename: signals.adoc
2348+
summary: Learn more about how application components can interact in a loosely coupled fashion
2349+
categories: miscellaneous
2350+
topics:
2351+
- events
2352+
- signals
2353+
- messages
2354+
extensions:
2355+
- io.quarkus:quarkus-signals
2356+
type: guide
2357+
status: experimental
2358+
url: /guides/signals
23462359
- title: Quarkus Virtual Thread support for gRPC services
23472360
filename: grpc-virtual-threads.adoc
23482361
summary: This guide explains how to benefit from Java virtual threads when implementing a gRPC service.

_generated-doc/main/infra/quarkus-all-build-items.adoc

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -178,17 +178,6 @@ _No Javadoc found_
178178

179179

180180

181-
a| https://github.com/quarkusio/quarkus/blob/main/core/deployment/src/main/java/io/quarkus/deployment/sbom/ApplicationManifestsBuildItem.java[`io.quarkus.deployment.sbom.ApplicationManifestsBuildItem`, window="_blank"]
182-
[.description]
183-
--
184-
Application manifests collected in a build
185-
-- a|`java.util.Collection<ApplicationManifest> manifests`
186-
187-
_No Javadoc found_
188-
189-
190-
191-
192181
a| https://github.com/quarkusio/quarkus/blob/main/core/deployment/src/main/java/io/quarkus/deployment/builditem/ApplicationStartBuildItem.java[`io.quarkus.deployment.builditem.ApplicationStartBuildItem`, window="_blank"]
193182
[.description]
194183
--
@@ -237,7 +226,7 @@ _No Javadoc found_
237226

238227
_No Javadoc found_
239228

240-
`io.quarkus.sbom.ApplicationManifestConfig manifestConfig`
229+
`io.quarkus.sbom.CoreSbomContributionConfig coreSbomConfig`
241230

242231
_No Javadoc found_
243232

@@ -1426,7 +1415,7 @@ _No Javadoc found_
14261415

14271416
_No Javadoc found_
14281417

1429-
`io.quarkus.sbom.ApplicationManifestConfig manifestConfig`
1418+
`io.quarkus.sbom.CoreSbomContributionConfig coreSbomConfig`
14301419

14311420
_No Javadoc found_
14321421

@@ -2668,6 +2657,20 @@ _No Javadoc found_
26682657

26692658

26702659

2660+
a| https://github.com/quarkusio/quarkus/blob/main/core/deployment/src/main/java/io/quarkus/deployment/sbom/SbomContributionBuildItem.java[`io.quarkus.deployment.sbom.SbomContributionBuildItem`, window="_blank"]
2661+
[.description]
2662+
--
2663+
A build item that allows Quarkus extensions to contribute additional components to the application SBOM.
2664+
This build item carries an `SbomContribution` containing component descriptors and their dependency relationships from any package ecosystem (npm, Maven, etc.).
2665+
Extension contributions are merged with the core application contribution (assembled from the application's Maven dependency model and packaging output) by an SBOM generator. Extensions should not designate a main component — only the core contribution does that.
2666+
The API around this is still in development and will likely change in the near future.
2667+
-- a|`io.quarkus.sbom.SbomContribution contribution`
2668+
2669+
_No Javadoc found_
2670+
2671+
2672+
2673+
26712674
a| https://github.com/quarkusio/quarkus/blob/main/core/deployment/src/main/java/io/quarkus/deployment/builditem/nativeimage/ServiceProviderBuildItem.java[`io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem`, window="_blank"]
26722675
[.description]
26732676
--
@@ -9454,6 +9457,21 @@ Used to create the publisher for the graphql trafic log in dev ui
94549457
_No Javadoc found_
94559458

94569459

9460+
9461+
9462+
a| https://github.com/quarkusio/quarkus/blob/main/extensions/smallrye-graphql/deployment/src/main/java/io/quarkus/smallrye/graphql/deployment/SmallRyeGraphQLFinalIndexModifierBuildItem.java[`io.quarkus.smallrye.graphql.deployment.SmallRyeGraphQLFinalIndexModifierBuildItem`, window="_blank"]
9463+
[.description]
9464+
--
9465+
Build item for modifying the final index used by SmallRye GraphQL. Extensions can produce this build item to apply custom modifications to the index before the GraphQL schema is built. Modifiers are applied in priority order (lower priority values are applied first). If multiple modifiers have the same priority, they are applied in the order they were produced (stable sort).
9466+
-- a|`int priority`
9467+
9468+
_No Javadoc found_
9469+
9470+
`io.quarkus.smallrye.graphql.deployment.SmallRyeGraphQLFinalIndexModifier modifier`
9471+
9472+
_No Javadoc found_
9473+
9474+
94579475
|===
94589476
== SmallRye GraphQL Client
94599477
[.configuration-reference,cols=2*]

_versions/main/guides/cyclonedx.adoc

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ This guide covers:
2121
* <<sbom-endpoint,SBOM REST Endpoint>> — exposing embedded dependency SBOMs via a REST endpoint
2222
* <<distribution-sboms,Distribution SBOMs>> — generating SBOMs that manifest the final application distribution after a build
2323
* <<vulnerability-scanning,Vulnerability scanning>> — using generated SBOMs with tools such as Grype to identify known vulnerabilities
24+
* <<extension-sbom-contributions,Extension SBOM contributions>> — contributing additional components to the application SBOM from Quarkus extensions
2425
2526
All SBOM generation in this guide follows the https://cyclonedx.org/[CycloneDX] specification.
2627

@@ -474,3 +475,78 @@ This approach is useful for scanning applications that are already deployed, for
474475
|`quarkus:component:scope` |`runtime` or `development` |Indicates whether a component is a runtime or a build/development time dependency of an application.
475476
|`quarkus:component:location` |String representing a file system path using `/` as a path element |Used in SBOMs with schema versions 1.4 or older. Starting from schema 1.5, `evidence.occurrences.location` is used instead. This property is used only if a component is found in the distribution. The value is a relative path to a file pointing to the location of a component in a distribution using `/` as a path element separator.
476477
|===
478+
479+
[[extension-sbom-contributions]]
480+
== Extension SBOM Contributions
481+
482+
By default, Quarkus generates SBOMs from the application's Maven dependency model and the packaging output.
483+
Extensions that manage additional software components — for example, npm packages or other non-Maven artifacts — can contribute those components to the application SBOM by producing `SbomContributionBuildItem` instances from their `@BuildStep` methods.
484+
485+
Extension contributions are merged with the core application contribution by the SBOM generator.
486+
Components marked as top-level will appear as direct dependencies of the main application component in the generated SBOM.
487+
488+
=== API Overview
489+
490+
Extension SBOM contributions are built from the following classes:
491+
492+
* `io.quarkus.sbom.Purl` — identifies a software component using the https://github.com/package-url/purl-spec[Package URL] specification. Factory methods are provided for Maven, npm, and generic component types.
493+
* `io.quarkus.sbom.ComponentDescriptor` — describes a software component with its PURL, scope, integrity hash, and other metadata.
494+
* `io.quarkus.sbom.ComponentDependencies` — describes the dependency relationships of a component, referencing other components by their bom-ref.
495+
* `io.quarkus.sbom.SbomContribution` — groups component descriptors and their dependency relationships into a single contribution.
496+
* `io.quarkus.deployment.sbom.SbomContributionBuildItem` — a `MultiBuildItem` that carries an `SbomContribution` to the SBOM generator.
497+
498+
=== Example
499+
500+
The following example shows a `@BuildStep` method that contributes npm packages to the application SBOM:
501+
502+
[source,java]
503+
----
504+
import io.quarkus.deployment.annotations.BuildStep;
505+
import io.quarkus.deployment.sbom.SbomContributionBuildItem;
506+
import io.quarkus.sbom.ComponentDependencies;
507+
import io.quarkus.sbom.ComponentDescriptor;
508+
import io.quarkus.sbom.Purl;
509+
import io.quarkus.sbom.SbomContribution;
510+
511+
@BuildStep
512+
SbomContributionBuildItem contributeNpmComponents() {
513+
514+
// Describe an npm package
515+
ComponentDescriptor react = ComponentDescriptor.builder()
516+
.setPurl(Purl.npm(null, "react", "18.2.0"))
517+
.setScope(ComponentDescriptor.SCOPE_RUNTIME)
518+
.setIntegrity("sha512-...") // SRI hash from package-lock.json
519+
.setTopLevel(true) // direct dependency of the application
520+
.build();
521+
522+
// Describe a transitive npm dependency
523+
ComponentDescriptor loosEnvify = ComponentDescriptor.builder()
524+
.setPurl(Purl.npm(null, "loose-envify", "1.4.0"))
525+
.setScope(ComponentDescriptor.SCOPE_RUNTIME)
526+
.build();
527+
528+
// Describe the dependency relationship: react depends on loose-envify
529+
ComponentDependencies reactDeps = ComponentDependencies.builder()
530+
.setBomRef(react.getBomRef())
531+
.addDependsOn(loosEnvify.getBomRef())
532+
.build();
533+
534+
// Build the contribution
535+
SbomContribution contribution = SbomContribution.builder()
536+
.addComponent(react)
537+
.addComponent(loosEnvify)
538+
.addDependency(reactDeps)
539+
.build();
540+
541+
return new SbomContributionBuildItem(contribution);
542+
}
543+
----
544+
545+
=== Key Points
546+
547+
* Extensions must not designate a main component — only the core application contribution does that.
548+
* Components from any package ecosystem can be contributed using the appropriate `Purl` type (e.g., `Purl.npm(...)`, `Purl.maven(...)`, `Purl.generic(...)`, or `Purl.of(type, ...)` for other ecosystems).
549+
* Set `topLevel(true)` on components that are direct dependencies of the application (e.g., packages declared in `package.json`). Transitive dependencies should not be marked as top-level.
550+
* The `scope` field classifies components as `runtime` or `development` dependencies, which is recorded in the SBOM as the `quarkus:component:scope` property.
551+
* The `integrity` field can carry an SRI-format hash (e.g., from lock files) for component verification.
552+
* Dependency relationships are optional. If you only need to list components without expressing their dependency graph, use `SbomContribution.ofComponents(...)`.

_versions/main/guides/jar-tree-shaking.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,12 @@ When tree-shaking is enabled, the build log includes a one-line summary at info
184184

185185
[source]
186186
----
187-
Tree-shaking removed 2469 unreachable classes from 15 dependencies, saving 1.5 MB (20.0%)
187+
Tree-shaking removed 2469 unreachable classes from 15 dependencies, saving 1.5 MB (20.0%) of bytecode
188188
----
189189

190+
The reported savings represent raw (uncompressed) bytecode removed from dependency classes.
191+
The actual reduction in packaged application size will be smaller because JARs are ZIP-compressed and also contain non-class resources (such as `META-INF` entries) that tree-shaking does not affect.
192+
190193
For a detailed per-dependency breakdown, enable debug logging for the tree shaker. The debug output includes total/reachable/removed class counts and a list of affected dependencies.
191194

192195
If your application throws a `ClassNotFoundException` or `NoClassDefFoundError` at runtime after enabling tree-shaking, a needed class may have been incorrectly identified as unreachable.

_versions/main/guides/qute-reference.adoc

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,23 @@ You can learn more about virtual methods in the <<virtual_methods,following sect
304304
<1> no namespace, two parts - `item`, `getLabels(1)`, the second part is a virtual method with name `getLabels` and params `1`
305305
<2> infix notation that can be used for virtual methods with single parameter, translated to `name.or('John')`; no namespace, two parts - `name`, `or('John')`
306306

307+
An expression can also use a <<literals,literal>> value as the base, followed by property accessors or virtual method invocations.
308+
309+
.Literal Base Expression Examples
310+
[source]
311+
----
312+
{='foo'.toUpperCase} <1>
313+
{=1.intValue} <2>
314+
{#let name=('foo'.toUpperCase)}{name}{/let} <3>
315+
{name.replace('foo'.toUpperCase)} <4>
316+
----
317+
<1> string literal as the base followed by a property accessor; outputs `FOO`
318+
<2> integer literal as the base followed by a property accessor; outputs `1`
319+
<3> in a <<let_section,let>> section parameter, a literal base can be used directly inside parentheses
320+
<4> a literal base can also be used in nested expressions passed as parameters of virtual methods
321+
322+
NOTE: In a top-level output expression, a literal base requires a special syntax prefix (such as `=`) configured via `ParserConfig`.
323+
307324
[[literals]]
308325
==== Supported Literals
309326

@@ -1019,7 +1036,7 @@ This section allows you to define named local variables.
10191036
{/let} <3>
10201037
----
10211038
<1> The local variable is initialized with an expression that can also represent a <<literals,literal>>, i.e. `isActive=false` and `age=10`.
1022-
<2> The infix notation is only supported if parentheses are used for grouping, e.g. `price=(order.price + 10)` is equivalent to `price=order.price.plus(10)`.
1039+
<2> The infix notation is only supported if parentheses are used for grouping, e.g. `price=(order.price + 10)` is equivalent to `price=order.price.plus(10)`. A literal value can also be used as the first operand, e.g. `price=('$' + item.price)`.
10231040
<3> Variables are not available outside the `let` section.
10241041

10251042
The variables are not available outside the defining `let` section.

0 commit comments

Comments
 (0)