[jira] (MNG-1378) Make dependencies of test-jars transitive

2014-07-15 Thread Reto Gmuer (JIRA)

[ 
https://jira.codehaus.org/browse/MNG-1378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=349768#comment-349768
 ] 

Reto Gmuer commented on MNG-1378:
-

I agree with the last three comments. Write a test-utils artifact which can 
then be a test-scoped dependency of sub1 and sub2, test-utils will have 
commons-lang as a normal (compile-time) dependency.

 Make dependencies of test-jars transitive
 -

 Key: MNG-1378
 URL: https://jira.codehaus.org/browse/MNG-1378
 Project: Maven
  Issue Type: Bug
  Components: Dependencies
Affects Versions: 2.0
Reporter: Mark Hobson
 Fix For: Issues to be reviewed for 3.x

 Attachments: mng1378.tar.gz


 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 was sent by Atlassian JIRA
(v6.1.6#6162)


[jira] (MNG-1378) Make dependencies of test-jars transitive

2014-07-14 Thread Didier Loiseau (JIRA)

[ 
https://jira.codehaus.org/browse/MNG-1378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=349599#comment-349599
 ] 

Didier Loiseau commented on MNG-1378:
-

Then I guess dependencies on test-jars should be completely disallowed. If your 
tests depend on some test-jar, and you don't have the dependencies of that 
test-jar, it is well possible that your tests cannot compile at all!

It is not just a question of extending test cases, it could also be a question 
of reusing some other classes of the test-jar.

For example, suppose you have module X and module Y which depends on X. In the 
test classes of module X, you implement a {{TestUtil}} class which relies on 
some other class of X's main classpath and on some class from a test-scoped 
dependency. Of course, the tests of X depend on {{TestUtil}}.

Now, in the tests of module Y, you would like to reuse {{TestUtil}}. You thus 
need to declare a test-scoped dependency on X's test-jar. But for the moment 
you also have to redeclare all the test-scoped dependencies of X in order to 
use that class. And you cannot move that class somewhere else, due to its 
dependencies.

 Make dependencies of test-jars transitive
 -

 Key: MNG-1378
 URL: https://jira.codehaus.org/browse/MNG-1378
 Project: Maven
  Issue Type: Bug
  Components: Dependencies
Affects Versions: 2.0
Reporter: Mark Hobson
 Fix For: Issues to be reviewed for 3.x

 Attachments: mng1378.tar.gz


 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 was sent by Atlassian JIRA
(v6.1.6#6162)


[jira] (MNG-1378) Make dependencies of test-jars transitive

2014-07-14 Thread Peter Ansell (JIRA)

[ 
https://jira.codehaus.org/browse/MNG-1378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=349694#comment-349694
 ] 

Peter Ansell commented on MNG-1378:
---

One alternative if you need to depend on a testsuite that is published by a 
different module to ensure that the testsuite is published as a jar, not a 
test-jar, and it is pulled into test scope in the local module, with all of 
its dependencies. I have used this testsuite-module + testrunner-module 
pattern successfully in the past to publish both concrete and abstract 
testclasses, although generally only for compliance tests where a specific 
interface or protocol is being tested based on a well known specification.

 Make dependencies of test-jars transitive
 -

 Key: MNG-1378
 URL: https://jira.codehaus.org/browse/MNG-1378
 Project: Maven
  Issue Type: Bug
  Components: Dependencies
Affects Versions: 2.0
Reporter: Mark Hobson
 Fix For: Issues to be reviewed for 3.x

 Attachments: mng1378.tar.gz


 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 was sent by Atlassian JIRA
(v6.1.6#6162)


[jira] (MNG-1378) Make dependencies of test-jars transitive

2014-07-11 Thread Anders Kr. Andersen (JIRA)

[ 
https://jira.codehaus.org/browse/MNG-1378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=349524#comment-349524
 ] 

Anders Kr. Andersen commented on MNG-1378:
--

In my eyes tests are not public by any way
It is interfaces and implementation that makes an artifact

Therefore extending test cases is not something I would do.
Not only should you make correct interfaces and implementation, now you also 
need to consider making tests so they can be extended .. 
This pattern would add complexity to an artifact. 

I find the system is designed correct as it is !
-1 


 Make dependencies of test-jars transitive
 -

 Key: MNG-1378
 URL: https://jira.codehaus.org/browse/MNG-1378
 Project: Maven
  Issue Type: Bug
  Components: Dependencies
Affects Versions: 2.0
Reporter: Mark Hobson
 Fix For: Issues to be reviewed for 3.x

 Attachments: mng1378.tar.gz


 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 was sent by Atlassian JIRA
(v6.1.6#6162)


[jira] (MNG-1378) Make dependencies of test-jars transitive

2013-11-20 Thread Hugo Garza (JIRA)

[ 
https://jira.codehaus.org/browse/MNG-1378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=336071#comment-336071
 ] 

Hugo Garza commented on MNG-1378:
-

I was able to solve this by moving my test dependencies into the parent POM 
that both projects share, but this isn't possible in every case.

I guess the only thing I can do for now is to cast my vote for hopefully 
getting this feature implemented. I just learned about test-jar and was excited 
that it would just work but then I got my ClassNotFoundException and realized 
it was because of my missing transitive test dependencies.

 Make dependencies of test-jars transitive
 -

 Key: MNG-1378
 URL: https://jira.codehaus.org/browse/MNG-1378
 Project: Maven 2  3
  Issue Type: Bug
  Components: Dependencies
Affects Versions: 2.0
Reporter: Mark Hobson
 Fix For: Issues to be reviewed for 3.x

 Attachments: mng1378.tar.gz


 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, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] (MNG-1378) Make dependencies of test-jars transitive

2012-10-22 Thread Tony Lampada (JIRA)

[ 
https://jira.codehaus.org/browse/MNG-1378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=311946#comment-311946
 ] 

Tony Lampada commented on MNG-1378:
---

To Voters and Watchers: 
I registered this issue in the kickstarting section on FreedomSponsors. This 
means that if you need this issue that bad, you can go to 
http://www.freedomsponsors.org/core/issue/53/make-dependencies-of-test-jars-transitive
 and offer a few bucks for it.
(Learn more -- http://blog.freedomsponsors.org/about/)

 Make dependencies of test-jars transitive
 -

 Key: MNG-1378
 URL: https://jira.codehaus.org/browse/MNG-1378
 Project: Maven 2  3
  Issue Type: Bug
  Components: Dependencies
Affects Versions: 2.0
Reporter: Mark Hobson
 Fix For: Issues to be reviewed for 3.x

 Attachments: mng1378.tar.gz


 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, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] (MNG-1378) Make dependencies of test-jars transitive

2012-10-22 Thread Olivier Lamy (JIRA)

 [ 
https://jira.codehaus.org/browse/MNG-1378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Olivier Lamy updated MNG-1378:
--

Comment: was deleted

(was: To Voters and Watchers: 
I registered this issue in the kickstarting section on FreedomSponsors. This 
means that if you need this issue that bad, you can go to 
http://www.freedomsponsors.org/core/issue/53/make-dependencies-of-test-jars-transitive
 and offer a few bucks for it.
(Learn more -- http://blog.freedomsponsors.org/about/))

 Make dependencies of test-jars transitive
 -

 Key: MNG-1378
 URL: https://jira.codehaus.org/browse/MNG-1378
 Project: Maven 2  3
  Issue Type: Bug
  Components: Dependencies
Affects Versions: 2.0
Reporter: Mark Hobson
 Fix For: Issues to be reviewed for 3.x

 Attachments: mng1378.tar.gz


 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, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] (MNG-1378) Make dependencies of test-jars transitive

2012-10-21 Thread Karl M. Davis (JIRA)

[ 
https://jira.codehaus.org/browse/MNG-1378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=311914#comment-311914
 ] 

Karl M. Davis commented on MNG-1378:


For those still waiting on this, I recommend adopting the OSGi approach: 
separate test-only modules/projects. It's adds noise to the project structure, 
but is a cleaner separation. It has the added advantage of de-cluttering your 
project POMs and working around this issue.

 Make dependencies of test-jars transitive
 -

 Key: MNG-1378
 URL: https://jira.codehaus.org/browse/MNG-1378
 Project: Maven 2  3
  Issue Type: Bug
  Components: Dependencies
Affects Versions: 2.0
Reporter: Mark Hobson
 Fix For: Issues to be reviewed for 3.x

 Attachments: mng1378.tar.gz


 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, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] (MNG-1378) Make dependencies of test-jars transitive

2012-10-19 Thread Joshua Pollak (JIRA)

[ 
https://jira.codehaus.org/browse/MNG-1378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=311884#comment-311884
 ] 

Joshua Pollak commented on MNG-1378:


I'm amazed this issue has been open 7 years, it seems so basic.

 Make dependencies of test-jars transitive
 -

 Key: MNG-1378
 URL: https://jira.codehaus.org/browse/MNG-1378
 Project: Maven 2  3
  Issue Type: Bug
  Components: Dependencies
Affects Versions: 2.0
Reporter: Mark Hobson
 Fix For: Issues to be reviewed for 3.x

 Attachments: mng1378.tar.gz


 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, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] (MNG-1378) Make dependencies of test-jars transitive

2012-09-13 Thread Tomasz Szuba (JIRA)

[ 
https://jira.codehaus.org/browse/MNG-1378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=308388#comment-308388
 ] 

Tomasz Szuba commented on MNG-1378:
---

What is the status of this issue?
Is it even considered to implement this feature?

 Make dependencies of test-jars transitive
 -

 Key: MNG-1378
 URL: https://jira.codehaus.org/browse/MNG-1378
 Project: Maven 2  3
  Issue Type: Bug
  Components: Dependencies
Affects Versions: 2.0
Reporter: Mark Hobson
 Fix For: Issues to be reviewed for 3.x

 Attachments: mng1378.tar.gz


 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, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] (MNG-1378) Make dependencies of test-jars transitive

2012-03-14 Thread Alex Heneveld (JIRA)

[ 
https://jira.codehaus.org/browse/MNG-1378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=294097#comment-294097
 ] 

Alex Heneveld commented on MNG-1378:


+1

Naively I expected that a dependency which is both test-scoped and 
test-jar-classified would pull in test-scoped transitive dependencies, ie given

{code}
proj1 pom:
dependency
  artifactIdsupport/artifactId
  scopetest/scope
/dependency

proj2 pom:
dependency
  artifactIdproj1/artifactId
  classifertest-jar/classifier
  scopetest/scope
/dependency
{code}

Like others I'd like proj2 to see support without having to explicitly re-list 
it.

If I haven't declared classifier test-jar then it's fair enough not to pull in 
transitive test-scoped dependencies. I guess the problem is that classifier 
namespace isn't as formalised as scopes, and making dependency resolution 
itself dependent on the classifier name could get complicated?

Would a new tag {{importScopetest/importScope}} be a good solution?

(Although a part of me worries we this starts down a slippery slope, next 
wanting to introduce test-runtime and test-compile scopes...)


 Make dependencies of test-jars transitive
 -

 Key: MNG-1378
 URL: https://jira.codehaus.org/browse/MNG-1378
 Project: Maven 2  3
  Issue Type: Bug
  Components: Dependencies
Affects Versions: 2.0
Reporter: Mark Hobson
 Fix For: Issues to be reviewed for 3.x

 Attachments: mng1378.tar.gz


 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, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira