Could we have --exclude-modules option?
Alan Bateman
Alan.Bateman at oracle.com
Tue Aug 9 11:36:52 UTC 2022
On 08/08/2022 14:41, Andrejus Chaliapinas wrote:
> Let me elaborate a bit - recent use case was when 2 jars were
> exporting same package (such was fine in old classpath use case, but
> not anymore for Java modules case). And challenge was to figure out
> which exactly jar needs to be excluded from Java modules resolution
> graph to make overall Java Modules validation work and not lead to a
> conflict.
>
> Presence of either of those jars would satisfy obviously compilation,
> so issue here is not about compilation itself. With proposed exclude
> approach it would be much easier to exclude jar1 - do various
> evaluations/tests and if anything failing - switch to jar2. And do all
> that yet not touching Maven (other build tool) dependencies
> aggregation inside some folder/local repo. And once reaching point of
> passing set - adjust later dependencies in other places.
>
Have you tried java --validate-modules? This option will scan the module
path split package for other issues so that you get a dump of all issues.
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jigsaw-dev/attachments/20220809/76061bb2/attachment.htm>
More information about the jigsaw-dev
mailing list