Affects Version/s: 3.3.9, 3.5.0, 3.6.0
Fix Version/s: None
Environment:maven-3.3.9 to maven-3.6.0
We face an issue when a same is transitively brought by a
with provided scope, and another with default (compile) scope.
This will be computed as compile scope, while we expect it to be explicitly provided by .
For example, pom contains:
Assembly project pom contains:
But a mvn dependency:tree on assembly project will output:
And we can see the artifact which come from is now at compile scope. Note that we don't use any dependency management here (see simple reproducer project in attachment).
This is confusing, and leads to duplicate libraries in runtime classpath when is effectively provided in classpath of runtime (for example by an application server).
Moreover, based on Maven documentation about dependency mediation/scope, the transitive dependencies that are provided should be always ommited.
Then, how to package ONLY the libraries defined as compile/runtime (and ignore all the provided ones, and their transitives) ??