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

Index _all_ dependencies with a certain groupId #33316

Closed
famod opened this issue May 11, 2023 · 11 comments · Fixed by #37739
Closed

Index _all_ dependencies with a certain groupId #33316

famod opened this issue May 11, 2023 · 11 comments · Fixed by #37739
Labels
area/core kind/enhancement New feature or request
Milestone

Comments

@famod
Copy link
Member

famod commented May 11, 2023

Description

For the migration to Quarkus 3, I'm about to remove jandex-maven-plugin from my ~20 modules Maven project to have one thing less to keep in sync for each Quarkus update.

As I don't really like empty beans.xml and listing all artifactIds is pretty verbose (especially in a distributed config setup), having Quarkus index all artifacts that belong to a configured groupId would really help.
Relevant docs: https://quarkus.io/guides/cdi-reference#how-to-generate-a-jandex-index

Implementation ideas

It probably boils down to making quarkus.index-dependency.<name>.artifact-id optional.

@famod famod added the kind/enhancement New feature or request label May 11, 2023
@famod famod added area/arc Issue related to ARC (dependency injection) and removed triage/needs-triage labels May 11, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented May 11, 2023

/cc @Ladicek (arc), @manovotn (arc), @mkouba (arc)

@famod
Copy link
Member Author

famod commented May 11, 2023

Also /cc @geoand

@manovotn
Copy link
Contributor

As I don't really like empty beans.xml

Is there some actual reason why this wouldn't work for you or is it just a matter of preference?
Adding a marker file seems like, by far, the easiest solution here that wouldn't require any further work even if using distributed config setup. Or is there something I am missing?

@famod
Copy link
Member Author

famod commented May 11, 2023

Empty beans.xml do absolutely work. It's 20 empty files vs. one single config setting though.

@famod
Copy link
Member Author

famod commented May 11, 2023

PS: external libs are a different story w.r.t. beans.xml.

@manovotn
Copy link
Contributor

manovotn commented May 11, 2023

PS: external libs are a different story w.r.t. beans.xml.

Sure this one I can understand and that's what the configs are primarily for.

Empty beans.xml do absolutely work. It's 20 empty files vs. one single config setting though.

Right, but do they hurt anyhow? You basically add it and forget about it, not need for config as well.
It sure is possible to add what you're asking for, I am just curious why are marker files so bad.

Also note that CDI 4 uses this syntax to mark a bean archive in CDI Lite, see https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.html#bean_archive

@famod
Copy link
Member Author

famod commented May 11, 2023

Right, but do they hurt anyhow? You basically add it and forget about it, not need for config as well.

They don't, it's just more inconvenient. You have to remember to add them to new modules, for example (rare case, admittedly).
I'm not saying empty beans.xml files are bad per se. It's just about developer joy and getting things done quickly and neatly and DRY. 😉

@geoand
Copy link
Contributor

geoand commented May 12, 2023

I'm +0 on this

@Ladicek
Copy link
Contributor

Ladicek commented May 15, 2023

This could be done using an extension I think? Collect all the relevant vartifacts from the CurateOutcomeBuildItem and produce IndexDependencyBuildItem for them. Then, you don't even have to configure anything :-)

@gsmet
Copy link
Member

gsmet commented May 15, 2023

I think it could be a valuable addition if you're willing to do the work.

@mkouba
Copy link
Contributor

mkouba commented May 15, 2023

If we decide to implement this then it could be more practical to turn the artifact-id into a regex (or support wildcards?) so that it's possible to select a subset of artifacts with a given groupId.

@mkouba mkouba added area/core and removed area/arc Issue related to ARC (dependency injection) labels Dec 14, 2023
mkouba added a commit to mkouba/quarkus that referenced this issue Dec 14, 2023
@quarkus-bot quarkus-bot bot added this to the 3.7 - main milestone Dec 18, 2023
carlesarnal pushed a commit to carlesarnal/quarkus that referenced this issue Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants