Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 2.0.1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:jdk1.5.0_04, mvn 2.0.1
-
Complexity:Intermediate
-
Number of attachments :
Description
If we have a root pom.xml that includes dependencyManagement and specifies the scope on a dependent component to be test, it's picked up in a subproject, but it's does not appear to be transitive.
e.g. parent pom
<dependencyMgmt>
<dependency>
<artifactId>easymock</artifactId>
...
<scope>test</scope>
</dependency>
</dependencyMgmt>
child pom
<dependency>
<artifactId>easymock</artifactId>
</dependency>
peer pom
<dependency>
<artifactId>child</artifactId>
</dependency>
<dependency>
<artifactId>easymock</artifactId>
</dependency>
The peer pom gets compilation exceptions indicating that it can't find the package specified by the dependent jar easymock. The easymock jar is nowhere in the classpath.
Judging by this: http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
the test scope should be transitive.
Brian
Issue Links
| This issue duplicates: | ||||
| MNG-1378 | Make dependencies of test-jars transitive |
|
|
|
I made an error.
The peer pom only looks like this:
<dependency>
<artifactId>child</artifactId>
</dependency>
and has no reference to easymock, however it should pick it up transitively, or so I believe.