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

[jira] Created: (MNG-1921) test scope in dependencyManagement does not appear to be transitive to dependent subProjects

test scope in dependencyManagement does not appear to be transitive to dependent subProjects
--------------------------------------------------------------------------------------------

         Key: MNG-1921
         URL: http://jira.codehaus.org/browse/MNG-1921
     Project: Maven 2
        Type: Bug

    Versions: 2.0.1    
 Environment: jdk1.5.0_04, mvn 2.0.1
    Reporter: Brian Bonner


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

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


[jira] Commented: (MNG-1921) test scope in dependencyManagement does not appear to be transitive to dependent subProjects

Posted by "Brian Bonner (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1921?page=comments#action_55298 ] 

Brian Bonner commented on MNG-1921:
-----------------------------------

You are correct,  I had the example trimmed to illustrate the hierarchy issue.  I'll try to include a more complete test case in the future.

Child inherits parent (dependency mgmt info for test), but dependent peer was not getting the test scope dependency that the peer project it depended on had.

I think the crux is that I didn't realize that test scope jars were not transitive.  Can you help me understand why?

If this *is* the case, then I'll just have to declare the test dependencies in each module that also needs the test scope jars.  Is this correct?

Thanks.



> test scope in dependencyManagement does not appear to be transitive to dependent subProjects
> --------------------------------------------------------------------------------------------
>
>          Key: MNG-1921
>          URL: http://jira.codehaus.org/browse/MNG-1921
>      Project: Maven 2
>         Type: Bug

>     Versions: 2.0.1
>  Environment: jdk1.5.0_04, mvn 2.0.1
>     Reporter: Brian Bonner

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

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


[jira] Commented: (MNG-1921) test scope in dependencyManagement does not appear to be transitive to dependent subProjects

Posted by "Brian Bonner (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1921?page=comments#action_54936 ] 

Brian Bonner commented on MNG-1921:
-----------------------------------

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.




> test scope in dependencyManagement does not appear to be transitive to dependent subProjects
> --------------------------------------------------------------------------------------------
>
>          Key: MNG-1921
>          URL: http://jira.codehaus.org/browse/MNG-1921
>      Project: Maven 2
>         Type: Bug

>     Versions: 2.0.1
>  Environment: jdk1.5.0_04, mvn 2.0.1
>     Reporter: Brian Bonner

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

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


[jira] Commented: (MNG-1921) test scope in dependencyManagement does not appear to be transitive to dependent subProjects

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1921?page=comments#action_54946 ] 

Brett Porter commented on MNG-1921:
-----------------------------------

I don't think this is a bug. 

Let me understand:
child inherits parent, but peer does not?

dependency management is not transitive, however the easymock in the child should already be transitive to the peer. But tests scope jars are not.

There are other problems here: eg, no group ID.



> test scope in dependencyManagement does not appear to be transitive to dependent subProjects
> --------------------------------------------------------------------------------------------
>
>          Key: MNG-1921
>          URL: http://jira.codehaus.org/browse/MNG-1921
>      Project: Maven 2
>         Type: Bug

>     Versions: 2.0.1
>  Environment: jdk1.5.0_04, mvn 2.0.1
>     Reporter: Brian Bonner

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

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