You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2005/11/04 09:01:06 UTC

[jira] Updated: (MNG-1378) test-jar transitive dependencies are incorrectly calculated

     [ http://jira.codehaus.org/browse/MNG-1378?page=all ]

Brett Porter updated MNG-1378:
------------------------------

    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

  was:
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

    Fix Version: 2.1
    Environment: 

> test-jar transitive dependencies are incorrectly calculated
> -----------------------------------------------------------
>
>          Key: MNG-1378
>          URL: http://jira.codehaus.org/browse/MNG-1378
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core
>     Versions: 2.0
>     Reporter: Mark Hobson
>      Fix For: 2.1

>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org