You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Ryan Heinen (JIRA)" <ji...@codehaus.org> on 2012/12/18 20:34:13 UTC
[jira] (MNG-5412) Managed transitive dependencies are not always
resolved correctly
Ryan Heinen created MNG-5412:
--------------------------------
Summary: Managed transitive dependencies are not always resolved correctly
Key: MNG-5412
URL: https://jira.codehaus.org/browse/MNG-5412
Project: Maven 2 & 3
Issue Type: Bug
Affects Versions: 3.0.4, 3.0.3
Reporter: Ryan Heinen
Attachments: mvn-bug.zip
Specifically, in the following example, I would expect that Project #2 resolves v1.1 of Y since it has been managed by Project #1, but it actually resolves to v1.0.
* X depends on Y 1.0
* Project #1 depends on X, sets version of Y to 1.1 via dependencyManagement
* Project #2 depends on Project #1
I've attached an example project that exhibits this bug. The setup is as follows:
* library declares a dependency on msgpack 0.6.6, which has a transitive dependency on javassist 3.16.1-GA.
* library manages javassist's version to 3.17.1-GA.
* consumer depends on library
>From the root run
{{mvn clean install -f library/pom.xml}}
{{mvn dependency:tree -f consumer/pom.xml}}
The dependency:tree command will show that javassist version 3.16.1-GA is resolved for the consumer project.
I've also included the output of dependency:tree for the attached example:
{code}
$ mvn dependency:tree -f library/pom.xml
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building library 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ library ---
[INFO] com.example:library:jar:1.0-SNAPSHOT
[INFO] \- org.msgpack:msgpack:jar:0.6.6:compile
[INFO] +- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] | \- junit:junit:jar:4.10:compile
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.1:compile
[INFO] \- org.javassist:javassist:jar:3.17.1-GA:compile (version managed from 3.16.1-GA)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.370s
[INFO] Finished at: Tue Dec 18 11:24:59 PST 2012
[INFO] Final Memory: 5M/81M
[INFO] ------------------------------------------------------------------------
{code}
{code}
$ mvn dependency:tree -f consumer/pom.xml
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building consumer 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ consumer ---
[INFO] com.example:consumer:jar:1.0-SNAPSHOT
[INFO] \- com.example:library:jar:1.0-SNAPSHOT:compile
[INFO] \- org.msgpack:msgpack:jar:0.6.6:compile
[INFO] +- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] | \- junit:junit:jar:4.10:compile
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.1:compile
[INFO] \- org.javassist:javassist:jar:3.16.1-GA:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.279s
[INFO] Finished at: Tue Dec 18 11:25:26 PST 2012
[INFO] Final Memory: 5M/81M
[INFO] ------------------------------------------------------------------------
{code}
--
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-5412) Managed transitive dependencies are not always
resolved correctly
Posted by "Ryan Heinen (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MNG-5412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315886#comment-315886 ]
Ryan Heinen commented on MNG-5412:
----------------------------------
Note that if I add an explicit dependency on javassist to the dependencies tag in library/pom.xml the version resolves correctly in consumer:
{code}
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
</dependency>
{code}
> Managed transitive dependencies are not always resolved correctly
> -----------------------------------------------------------------
>
> Key: MNG-5412
> URL: https://jira.codehaus.org/browse/MNG-5412
> Project: Maven 2 & 3
> Issue Type: Bug
> Affects Versions: 3.0.3, 3.0.4
> Reporter: Ryan Heinen
> Attachments: mvn-bug.zip
>
>
> Specifically, in the following example, I would expect that Project #2 resolves v1.1 of Y since it has been managed by Project #1, but it actually resolves to v1.0.
> * X depends on Y 1.0
> * Project #1 depends on X, sets version of Y to 1.1 via dependencyManagement
> * Project #2 depends on Project #1
> I've attached an example project that exhibits this bug. The setup is as follows:
> * library declares a dependency on msgpack 0.6.6, which has a transitive dependency on javassist 3.16.1-GA.
> * library manages javassist's version to 3.17.1-GA.
> * consumer depends on library
> From the root run
> {{mvn clean install -f library/pom.xml}}
> {{mvn dependency:tree -f consumer/pom.xml}}
> The dependency:tree command will show that javassist version 3.16.1-GA is resolved for the consumer project.
> I've also included the output of dependency:tree for the attached example:
> {code}
> $ mvn dependency:tree -f library/pom.xml
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building library 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ library ---
> [INFO] com.example:library:jar:1.0-SNAPSHOT
> [INFO] \- org.msgpack:msgpack:jar:0.6.6:compile
> [INFO] +- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
> [INFO] | \- junit:junit:jar:4.10:compile
> [INFO] | \- org.hamcrest:hamcrest-core:jar:1.1:compile
> [INFO] \- org.javassist:javassist:jar:3.17.1-GA:compile (version managed from 3.16.1-GA)
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 1.370s
> [INFO] Finished at: Tue Dec 18 11:24:59 PST 2012
> [INFO] Final Memory: 5M/81M
> [INFO] ------------------------------------------------------------------------
> {code}
> {code}
> $ mvn dependency:tree -f consumer/pom.xml
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building consumer 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ consumer ---
> [INFO] com.example:consumer:jar:1.0-SNAPSHOT
> [INFO] \- com.example:library:jar:1.0-SNAPSHOT:compile
> [INFO] \- org.msgpack:msgpack:jar:0.6.6:compile
> [INFO] +- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
> [INFO] | \- junit:junit:jar:4.10:compile
> [INFO] | \- org.hamcrest:hamcrest-core:jar:1.1:compile
> [INFO] \- org.javassist:javassist:jar:3.16.1-GA:compile
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 1.279s
> [INFO] Finished at: Tue Dec 18 11:25:26 PST 2012
> [INFO] Final Memory: 5M/81M
> [INFO] ------------------------------------------------------------------------
> {code}
--
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