Skip to content
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

Merged
merged 1 commit into from
Mar 18, 2021

Conversation

aloubyansky
Copy link
Member

@aloubyansky aloubyansky commented Mar 15, 2021

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 the quarkus-maven-plugin (a copy of quarkus-bootstrap-maven-plugin:build-tree which is now deprecated)

@quarkus-bot quarkus-bot bot added area/core area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/documentation area/maven labels Mar 15, 2021
@aloubyansky aloubyansky force-pushed the conditional-extension-deps branch 4 times, most recently from c2ce60f to ea42c84 Compare March 17, 2021 13:05
@aloubyansky aloubyansky marked this pull request as ready for review March 17, 2021 13:06
@aloubyansky
Copy link
Member Author

@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.

import java.util.TreeMap;
import org.eclipse.aether.version.Version;

public class BootstrapArtifactVersion implements Version {
Copy link
Member

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 😁

@aloubyansky aloubyansky force-pushed the conditional-extension-deps branch from ea42c84 to 0ef782f Compare March 17, 2021 13:58
@maxandersen
Copy link
Member

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 ?

@aloubyansky
Copy link
Member Author

Yes

Added quarkus:dependency-tree Maven goal to quarkus-maven-plugin (copied from quarkus-bootstrap-maven-plugin:build-tree)
@aloubyansky aloubyansky force-pushed the conditional-extension-deps branch from 0ef782f to af0c4fb Compare March 17, 2021 17:09
Copy link
Member

@kenfinnigan kenfinnigan left a 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?

@aloubyansky
Copy link
Member Author

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.

@aloubyansky
Copy link
Member Author

I created the main enhancement issue to track the rest of the tasks #15844

@aloubyansky aloubyansky merged commit 0f83aca into quarkusio:main Mar 18, 2021
@quarkus-bot quarkus-bot bot added this to the 1.14 - main milestone Mar 18, 2021
@gastaldi gastaldi linked an issue Mar 18, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/documentation area/maven
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support optional extension dependencies for an extension
4 participants