maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <>
Subject Re: Transitive Dependency Question
Date Tue, 04 Jun 2013 07:37:24 GMT
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:
For additional commands, e-mail:

View raw message