You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quarkus extensions can currently declare an endpoint on the management interface by depending on quarkus-vertx-http-deployment and using a build item specific to vertx-http.
However, some extensions don't have any other reason to depend on vertx-http; they could theoretically be used in a CLI application that has no vertx at all.
For these extensions, adding the dependency to vertx-http is problematic, because there is no way to make the dependency optional:
They need a dependency to the deployment artifact, and that dependency cannot be made optional
They also need a dependency to the runtime artifact, and if the dependency to the deployment artifact is non-optional, then the runtime dependency cannot be optional (which makes sense: the deployment's build steps could generate bytecode that depends on the runtime)
Implementation ideas
One solution to get out of this sorry state of affairs would be to introduce a quarkus-vertx-http-deployment-spi artifact, which would:
depend transitively on quarkus-vertx-http (runtime)
expose all relevant build items designed to be produced/consumed by other extensions: NonApplicationRootPathBuildItem, RouteBuildItem, ...
NOT contain any build steps, so its presence in the classpath would not, by itself, affect the build.
Then it would be possible for another extension to depend on quarkus-vertx-http-deployment-spi in its deployment artifact, and to depend optionally (<optional>true</optional>) on quarkus-vertx-http (runtime) in its runtime artifact:
If an application contains this other extension without quarkus-vertx-http, the contribution to the management interface would get ignored: the relevant build items would not get consumed.
If an application contains this other extension andquarkus-vertx-http, the contribution to the management interface would be taken into account: quarkus-vertx-http-deployment would be in the build classpath, along with its build steps that consume the relevant build items.
The text was updated successfully, but these errors were encountered:
Description
See #35065 for the original discussion
Quarkus extensions can currently declare an endpoint on the management interface by depending on
quarkus-vertx-http-deployment
and using a build item specific to vertx-http.However, some extensions don't have any other reason to depend on vertx-http; they could theoretically be used in a CLI application that has no vertx at all.
For these extensions, adding the dependency to vertx-http is problematic, because there is no way to make the dependency optional:
Implementation ideas
One solution to get out of this sorry state of affairs would be to introduce a
quarkus-vertx-http-deployment-spi
artifact, which would:quarkus-vertx-http
(runtime)NonApplicationRootPathBuildItem
,RouteBuildItem
, ...Then it would be possible for another extension to depend on
quarkus-vertx-http-deployment-spi
in its deployment artifact, and to depend optionally (<optional>true</optional>
) onquarkus-vertx-http
(runtime) in its runtime artifact:quarkus-vertx-http
, the contribution to the management interface would get ignored: the relevant build items would not get consumed.quarkus-vertx-http
, the contribution to the management interface would be taken into account:quarkus-vertx-http-deployment
would be in the build classpath, along with its build steps that consume the relevant build items.The text was updated successfully, but these errors were encountered: