-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditional extension dependencies support for Maven-based projects #15736
Conditional extension dependencies support for Maven-based projects #15736
Conversation
c2ce60f
to
ea42c84
Compare
@FroMage mentioned to me I needed a better example in the doc. I'll improve that. We'll need to document the Gradle part as well when it's ready, so the doc will be evolving. I just wanted to get the code changes in ASAP to see whether they introduce any regressions. |
.../src/main/java/io/quarkus/bootstrap/resolver/maven/DeploymentInjectingDependencyVisitor.java
Show resolved
Hide resolved
.../src/main/java/io/quarkus/bootstrap/resolver/maven/DeploymentInjectingDependencyVisitor.java
Outdated
Show resolved
Hide resolved
.../src/main/java/io/quarkus/bootstrap/resolver/maven/DeploymentInjectingDependencyVisitor.java
Outdated
Show resolved
Hide resolved
import java.util.TreeMap; | ||
import org.eclipse.aether.version.Version; | ||
|
||
public class BootstrapArtifactVersion implements Version { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO you should use SmallRye Common's version facility. For no particular reason 😁
ea42c84
to
0ef782f
Compare
I see from zulip conversations that gradle is not as straight forward - so are we suggesting to put this in but not enable it yet until gradle appraoch figured out or whats the intended approach ? |
Yes |
Added quarkus:dependency-tree Maven goal to quarkus-maven-plugin (copied from quarkus-bootstrap-maven-plugin:build-tree)
0ef782f
to
af0c4fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like it would solve my use case nicely for OpenTelemetry and Vert.x optional dependencies.
One comment is whether the conditional dependencies doc should be linked from the extension writing doc, otherwise, I'm not sure how extension writers would know to search for this?
The doc will definitely need to be made easy to locate. It's just it's not yet in its final state (the feature isn't yet fully supported, i.e. the gradle side of it) and linking it from the published ones is currently to early. |
I created the main enhancement issue to track the rest of the tasks #15844 |
This is PR enables conditional extension dependencies for Maven-based projects. The doc describing how they work and how to configured them is included.
The gradle support will come in a different PR.
Also this PR adds
quarkus:dependency-tree
Maven goal to thequarkus-maven-plugin
(a copy ofquarkus-bootstrap-maven-plugin:build-tree
which is now deprecated)