Skip to content

Commit

Permalink
Minor conditional dependencies doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Loubyansky committed Nov 22, 2024
1 parent b33f07e commit 5e9bef3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/src/main/asciidoc/conditional-extension-dependencies.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ A Quarkus extension may declare one or more conditional dependencies on other Qu

Let's consider the following scenario as an example: `quarkus-extension-a` has an optional dependency on `quarkus-extension-b` which should be included in a Quarkus application only if `quarkus-extension-c` is found among the application dependencies (direct or transitive). In this case, the presence of `quarkus-extension-c` is the condition which, if satisfied, will trigger inclusion of the `quarkus-extension-b` when Quarkus application dependencies are resolved.

The condition which triggers activation of an extension is configured in the extension's `META-INF/quarkus-extension.properties`, which is included in the runtime artifact of the extension.Extension developers can add the following configuration to express the condition which would have to be satisfied for the extension to be activated:
The condition which triggers activation of an extension is configured in the extension's `META-INF/quarkus-extension.properties`, which is included in the runtime artifact of the extension. Extension developers can add the following configuration to express the condition which would have to be satisfied for the extension to be activated:

[source,xml]
----
Expand Down Expand Up @@ -182,7 +182,7 @@ In this case, the Maven dependency is not at all required in the `pom.xml` file.

== Dev mode-only extension dependencies

Extensions can also declare conditional dependencies on other extensions using Dev mode as the condition or one of the conditions for those dependencies to be activated.
Extensions can also declare conditional dependencies on other extensions using dev mode as the condition or one of the conditions for those dependencies to be activated.

Dev mode-only extension dependencies can be configured in the Quarkus extension plugin in the following way:

Expand Down Expand Up @@ -223,11 +223,11 @@ Dev mode-only extension dependencies can be configured in the Quarkus extension
----
<1> the runtime Quarkus extension artifact ID;
<2> the goal that generates the extension descriptor which every Quarkus runtime extension project should be configured with;
<3> the Dev mode conditional dependency configuration element;
<4> the artifact coordinates of conditional dependencies on extensions that should be evaluated only if an application is launched in Dev mode.
<3> the dev mode conditional dependency configuration element;
<4> the artifact coordinates of conditional dependencies on extensions that should be evaluated only if an application is launched in dev mode.

The `quarkus-extension-b`, in this example, may or may not define its own condition to be evaluated.

If the `quarkus-extension-b` does not define a dependency condition on its own (there is no dependency condition recorded in its `META-INF/quarkus-extension.properties`), the `quarkus-extension-b` will only be added as a dependency of the `quarkus-extension-a` in Dev mode but not in other modes (prod or test).
If the `quarkus-extension-b` does not define a dependency condition on its own (there is no dependency condition recorded in its `META-INF/quarkus-extension.properties`), the `quarkus-extension-b` will only be added as a dependency of the `quarkus-extension-a` in dev mode but not in other modes (prod or test).

If the `quarkus-extension-b` does define a dependency condition on its own (a dependency condition recorded in its `META-INF/quarkus-extension.properties`), the `quarkus-extension-b` will be added as a dependency of the `quarkus-extension-a` in Dev mode only if its condition is satisfied (the artifacts it requires are present in the application dependency graph).
If the `quarkus-extension-b` does define a dependency condition on its own (a dependency condition recorded in its `META-INF/quarkus-extension.properties`), the `quarkus-extension-b` will be added as a dependency of the `quarkus-extension-a` in dev mode only if its condition is satisfied (the artifacts it requires are present in the application dependency graph).

0 comments on commit 5e9bef3

Please sign in to comment.