On 21/07/2022 14:24, Andrejus Chaliapinas wrote:
Hi,

While dealing with long list of Jar dependencies for complex Maven project and trying to resolve some of Java Modules conflicts - I'm finding that sometimes it could be useful to exclude some modules without yet removing actual jar file from aggregated directory of dependencies.

In that regards something like --exclude-modules would help initially to evaluate impact and later allow adjust build/dependencies resolution logic. What do you think?

I don't think this make sense as code will not compile or run if you dependences are removed. Have you found modules where the author has included `requires` clauses for modules that aren't actually required, or maybe you are dealing with a module path with many automatic modules and your module is being compiled with --add-modules ALL-MODULE-PATH?

One option to be aware of is the --limit-modules option [1] but I suspect it won't be useful to you right now.

-Alan

[1] https://openjdk.org/jeps/261#Limiting-the-observable-modules

Reply via email to