Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.0
-
Fix Version/s: Issues to be reviewed for 3.x
-
Component/s: Dependencies
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :
Description
test-jar transitive dependencies are calculated as per compile scope rather than test scope.
The situation is demonstrated nicely in it0077:
- module sub1 has a test-scoped dependency of commons-lang
- module sub2 has a test-scoped dependency of sub1 test-jar
sub2 tests should inherit the commons-lang transitive dependency. For example:
Index: maven-core-it/it0077/sub2/src/test/java/org/apache/maven/it0077/PersonTwoTest.java
===================================================================
— maven-core-it/it0077/sub2/src/test/java/org/apache/maven/it0077/PersonTwoTest.java (revision
328307)
+++ maven-core-it/it0077/sub2/src/test/java/org/apache/maven/it0077/PersonTwoTest.java (working
copy)
@@ -1,6 +1,7 @@
package org.apache.maven.it0077;
import junit.framework.TestCase;
+import org.apache.commons.lang.BooleanUtils;
public class PersonTwoTest
extends PersonTest
Results in:
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ----------------------------------------------------------------------------
[INFO] Compilation failure
c:\maven-components\maven-core-it\it0077\sub2\src\test\java\org\apache\maven\it0077\PersonTwoTest.java:[4,31]
package org.apache.commons.lang does not exist
Issue Links
- is depended upon by
-
MNG-1823
dependencies with classifier mask transitive dependencies of same dependency without classifier
-
- is duplicated by
-
MNG-1921
test scope in dependencyManagement does not appear to be transitive to dependent subProjects
-
-
MNG-2035
Add transitive dependencies with test scope when depending on a test-jar type dependency
-
- is related to
-
MNG-1971
Transitive dependencies not following attached tests.
-
- relates to
-
MNG-1571
Wrong calculation of transient dependecies if artifact is referenced from different scopes
-
Set a better title. The problem here is that by design test dependencies are not transitive