[External] : Re: Are modifiers `static` and `transitive` incompatible?
Alex Buckley
alex.buckley at oracle.com
Wed Feb 7 20:45:10 UTC 2024
On 2/7/2024 11:22 AM, Piotr P. Karwasz wrote: [Some edits for clarity]
> This is my main problem with any `requires static transitive Y;`
> directive in a module descriptor `X` that has an optional Maven
> dependency on `Y`: it forces ***users of `X`*** to manually add `Y`
> as Maven dependency in their project (it can be `provided` so it does
> not propagate).
I see that this impact on users is unfortunate. What I can't understand
is something you said earlier:
> in practice (`log4j-core`) code that depends
> on optional dependencies is in separate packages and accessed through
> reflection.
> This should be a runtime-only dependency, but many users do not care
> about the distinction between `compile` and `runtime` scope.
Doesn't the POM of log4j-core express that some artifact ("an optional
dependency") has `runtime` scope / is `provided` ? Why is it relevant
that users of log4j-core don't care about the distinction between scopes?
Alex
More information about the jigsaw-dev
mailing list