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

[jira] Created: (MNG-1568) test-jar dependency clobbers transitive dependency

test-jar dependency clobbers transitive dependency
--------------------------------------------------

         Key: MNG-1568
         URL: http://jira.codehaus.org/browse/MNG-1568
     Project: Maven 2
        Type: Bug
  Components: maven-core  
    Versions: 2.0    
 Environment: Linux 2.6.10-gentoo-r4 #1 SMP Mon Jan 10 14:53:56 EST 2005 i686 AMD Athlon(tm) MP 2400+ AuthenticAMD GNU/Linux
java version "1.4.2_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-b05)
Java HotSpot(TM) Client VM (build 1.4.2_09-b05, mixed mode)
    Reporter: Andrew Moore


Specifying a test-jar dependency clobbers any transitive dependency on
that project.

eg

projectA publishes jar and test-jar
projectB depends on projectA.jar (scope compile)
projectC depends on projectB.jar (scope compile) and projectA.test-jar
(scope test)

In projectC, the test scoped projectA.test-jar dependency effectively
clobbers the compile scoped transitive dependency on projectA.jar. ie
projectA.jar is no longer in projectC's compile scope dependency list.

If I explicitly specify the projectA.jar compile dependency in the projectC POM it is resolved correctly.

There are currently other issues with test-jar dependency
resolution that may be related.

MNG-1378 <http://jira.codehaus.org/browse/MNG-1378>

According to Brett "It shouldn't be clobbered, as
the conflict ID for a dependency is group:artifact:type:classifier" but this isn't what I am seeing.


-- 
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] Updated: (MNG-1568) test-jar dependency clobbers transitive dependency

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

Brett Porter updated MNG-1568:
------------------------------

    Fix Version: 2.0.1

sounds to me like sub2-test is being incorrectly selected instead of sub2 and that sub2-test has no dependencies.

Instead, both should be selected independantly, and all dependencies included using the appropriate scope mediation (admittedly, this is not always correct as listed in MNG-1378, but its what is expected for the 2.0.x series)

> test-jar dependency clobbers transitive dependency
> --------------------------------------------------
>
>          Key: MNG-1568
>          URL: http://jira.codehaus.org/browse/MNG-1568
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core
>     Versions: 2.0
>  Environment: Linux 2.6.10-gentoo-r4 #1 SMP Mon Jan 10 14:53:56 EST 2005 i686 AMD Athlon(tm) MP 2400+ AuthenticAMD GNU/Linux
> java version "1.4.2_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-b05)
> Java HotSpot(TM) Client VM (build 1.4.2_09-b05, mixed mode)
>     Reporter: Andrew Moore
>      Fix For: 2.0.1
>  Attachments: itMNG1568.tar.gz
>
>
> Specifying a test-jar dependency clobbers any transitive dependency on
> that project.
> eg
> projectA publishes jar and test-jar
> projectB depends on projectA.jar (scope compile)
> projectC depends on projectB.jar (scope compile) and projectA.test-jar
> (scope test)
> In projectC, the test scoped projectA.test-jar dependency effectively
> clobbers the compile scoped transitive dependency on projectA.jar. ie
> projectA.jar is no longer in projectC's compile scope dependency list.
> If I explicitly specify the projectA.jar compile dependency in the projectC POM it is resolved correctly.
> There are currently other issues with test-jar dependency
> resolution that may be related.
> MNG-1378 <http://jira.codehaus.org/browse/MNG-1378>
> According to Brett "It shouldn't be clobbered, as
> the conflict ID for a dependency is group:artifact:type:classifier" but this isn't what I am seeing.

-- 
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] Updated: (MNG-1568) test-jar dependency clobbers transitive dependency

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-1568?page=all ]

John Casey updated MNG-1568:
----------------------------

    Fix Version:     (was: 2.0.1)
                 2.0.2

> test-jar dependency clobbers transitive dependency
> --------------------------------------------------
>
>          Key: MNG-1568
>          URL: http://jira.codehaus.org/browse/MNG-1568
>      Project: Maven 2
>         Type: Bug
>   Components: Plugins and Lifecycle
>     Versions: 2.0
>  Environment: Linux 2.6.10-gentoo-r4 #1 SMP Mon Jan 10 14:53:56 EST 2005 i686 AMD Athlon(tm) MP 2400+ AuthenticAMD GNU/Linux
> java version "1.4.2_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-b05)
> Java HotSpot(TM) Client VM (build 1.4.2_09-b05, mixed mode)
>     Reporter: Andrew Moore
>      Fix For: 2.0.2
>  Attachments: itMNG1568.tar.gz
>
>
> Specifying a test-jar dependency clobbers any transitive dependency on
> that project.
> eg
> projectA publishes jar and test-jar
> projectB depends on projectA.jar (scope compile)
> projectC depends on projectB.jar (scope compile) and projectA.test-jar
> (scope test)
> In projectC, the test scoped projectA.test-jar dependency effectively
> clobbers the compile scoped transitive dependency on projectA.jar. ie
> projectA.jar is no longer in projectC's compile scope dependency list.
> If I explicitly specify the projectA.jar compile dependency in the projectC POM it is resolved correctly.
> There are currently other issues with test-jar dependency
> resolution that may be related.
> MNG-1378 <http://jira.codehaus.org/browse/MNG-1378>
> According to Brett "It shouldn't be clobbered, as
> the conflict ID for a dependency is group:artifact:type:classifier" but this isn't what I am seeing.

-- 
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-1568) test-jar dependency clobbers transitive dependency

Posted by "Andrew Moore (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1568?page=comments#action_51587 ] 

Andrew Moore commented on MNG-1568:
-----------------------------------

I have been playing around with the attached test case and can now reliably make it pass or fail depending upon the order in which I run the commands.

I run two configurations:
test - sub4/pom.xml includes sub2-test and PersonFourTest extends PersonTwoTest
notest - sub4/pom.xml does NOT include sub2-test and PersonFourTest extends Object

notest: mvn clean:clean install PASS
test: mvn clean:clean install FAIL

So far, so good. Now,

notest: mvn clean:clean install PASS
test: mvn install PASS

When I modify sub4/pom.xml, to add the sub2-test dependency, and do not clean, a regular compile is not triggered. The existing sub4 classes are used and everything 'works'.

This had me going for a while as sometimes my test would pass and othertimes it would fail.

Is this the expected behaviour? Should the compile plugin be aware of project metadata (the dependencies in this case) and that a change in metadata may require recompilation?


> test-jar dependency clobbers transitive dependency
> --------------------------------------------------
>
>          Key: MNG-1568
>          URL: http://jira.codehaus.org/browse/MNG-1568
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core
>     Versions: 2.0
>  Environment: Linux 2.6.10-gentoo-r4 #1 SMP Mon Jan 10 14:53:56 EST 2005 i686 AMD Athlon(tm) MP 2400+ AuthenticAMD GNU/Linux
> java version "1.4.2_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-b05)
> Java HotSpot(TM) Client VM (build 1.4.2_09-b05, mixed mode)
>     Reporter: Andrew Moore
>      Fix For: 2.0.1
>  Attachments: itMNG1568.tar.gz
>
>
> Specifying a test-jar dependency clobbers any transitive dependency on
> that project.
> eg
> projectA publishes jar and test-jar
> projectB depends on projectA.jar (scope compile)
> projectC depends on projectB.jar (scope compile) and projectA.test-jar
> (scope test)
> In projectC, the test scoped projectA.test-jar dependency effectively
> clobbers the compile scoped transitive dependency on projectA.jar. ie
> projectA.jar is no longer in projectC's compile scope dependency list.
> If I explicitly specify the projectA.jar compile dependency in the projectC POM it is resolved correctly.
> There are currently other issues with test-jar dependency
> resolution that may be related.
> MNG-1378 <http://jira.codehaus.org/browse/MNG-1378>
> According to Brett "It shouldn't be clobbered, as
> the conflict ID for a dependency is group:artifact:type:classifier" but this isn't what I am seeing.

-- 
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] Updated: (MNG-1568) test-jar dependency clobbers transitive dependency

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-1568?page=all ]

John Casey updated MNG-1568:
----------------------------

    Fix Version:     (was: 2.0.3)
                 2.0.4

> test-jar dependency clobbers transitive dependency
> --------------------------------------------------
>
>          Key: MNG-1568
>          URL: http://jira.codehaus.org/browse/MNG-1568
>      Project: Maven 2
>         Type: Bug

>   Components: Plugins and Lifecycle
>     Versions: 2.0
>  Environment: Linux 2.6.10-gentoo-r4 #1 SMP Mon Jan 10 14:53:56 EST 2005 i686 AMD Athlon(tm) MP 2400+ AuthenticAMD GNU/Linux
> java version "1.4.2_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-b05)
> Java HotSpot(TM) Client VM (build 1.4.2_09-b05, mixed mode)
>     Reporter: Andrew Moore
>      Fix For: 2.0.4
>  Attachments: itMNG1568.tar.gz
>
>
> Specifying a test-jar dependency clobbers any transitive dependency on
> that project.
> eg
> projectA publishes jar and test-jar
> projectB depends on projectA.jar (scope compile)
> projectC depends on projectB.jar (scope compile) and projectA.test-jar
> (scope test)
> In projectC, the test scoped projectA.test-jar dependency effectively
> clobbers the compile scoped transitive dependency on projectA.jar. ie
> projectA.jar is no longer in projectC's compile scope dependency list.
> If I explicitly specify the projectA.jar compile dependency in the projectC POM it is resolved correctly.
> There are currently other issues with test-jar dependency
> resolution that may be related.
> MNG-1378 <http://jira.codehaus.org/browse/MNG-1378>
> According to Brett "It shouldn't be clobbered, as
> the conflict ID for a dependency is group:artifact:type:classifier" but this isn't what I am seeing.

-- 
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] Updated: (MNG-1568) test-jar dependency clobbers transitive dependency

Posted by "Andrew Moore (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-1568?page=all ]

Andrew Moore updated MNG-1568:
------------------------------

    Attachment: itMNG1568.tar.gz

Here is a test case exhibiting this behaviour.

Based on it0077.

sub1 produces sub1.jar and sub1-test.jar
sub2 produces sub2.jar and sub2-test.jar
sub3 produces sub3.jar and sub3-test.jar
sub4 produces sub4.jar and sub4-test.jar

sub2 depends on sub1 scope compile
sub3 depends on sub2 and transitavely depends on sub1 scope compile
sub4 depends on sub3 and transitavely depends on sub1 and sub2 scope compile
sub4 additionally depends on sub2-test scope test

In sub4, if the sub2-test scope test dependency is omitted, testCompile fails as expected.
In sub4, if the sub2-test scope test dependency is included, compile fails due to the transitive dependency on sub1 being clobbered.


> test-jar dependency clobbers transitive dependency
> --------------------------------------------------
>
>          Key: MNG-1568
>          URL: http://jira.codehaus.org/browse/MNG-1568
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core
>     Versions: 2.0
>  Environment: Linux 2.6.10-gentoo-r4 #1 SMP Mon Jan 10 14:53:56 EST 2005 i686 AMD Athlon(tm) MP 2400+ AuthenticAMD GNU/Linux
> java version "1.4.2_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-b05)
> Java HotSpot(TM) Client VM (build 1.4.2_09-b05, mixed mode)
>     Reporter: Andrew Moore
>  Attachments: itMNG1568.tar.gz
>
>
> Specifying a test-jar dependency clobbers any transitive dependency on
> that project.
> eg
> projectA publishes jar and test-jar
> projectB depends on projectA.jar (scope compile)
> projectC depends on projectB.jar (scope compile) and projectA.test-jar
> (scope test)
> In projectC, the test scoped projectA.test-jar dependency effectively
> clobbers the compile scoped transitive dependency on projectA.jar. ie
> projectA.jar is no longer in projectC's compile scope dependency list.
> If I explicitly specify the projectA.jar compile dependency in the projectC POM it is resolved correctly.
> There are currently other issues with test-jar dependency
> resolution that may be related.
> MNG-1378 <http://jira.codehaus.org/browse/MNG-1378>
> According to Brett "It shouldn't be clobbered, as
> the conflict ID for a dependency is group:artifact:type:classifier" but this isn't what I am seeing.

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