Hi Jamal,
Jamal B wrote:
> Interesting....
>
> Taking your suggestion, it looks like it is coming in from another compile
> dependency, and was "promoted" to compile.
>
> [INFO] +- org.apache.maven.shared:maven-shared-jar:jar:1.1:compile
> [INFO] | +- org.codehaus.plexus:plexus-digest:jar:1.0:compile
> [INFO] | | \-
> org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:compile
> [INFO] | | +- junit:junit:jar:3.8.1:compile
>
> Is there a way to prevent this from happening without having to add
> exclude stanzas across projects where this is happening?
You can control this with a dependencyManagement section of a shared parent.
Just define there junit:junit:<version> and the scope.
The annoying part is nevertheless that the situation is no longer obvious in
M3. Try this in M2 and you'll see that the dependency makes much more sense.
Since the same plugin produces different output, I blame the new Aether
backend here which favors now the "nearest" occurrence without taking the
inherited scope into account. While this behavior has no impact on the
resulting class path, it hides dependency problems like the one, you have
encountered here.
- Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
|