[
https://jira.codehaus.org/browse/MNG-5121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279446#comment-279446
]
Steven Schlansker edited comment on MNG-5121 at 9/20/11 4:22 PM:
-----------------------------------------------------------------
I downloaded Henning's POM file, and tested it locally. With the versions that
included the same dependency loop, the compile fails with
Compilation failure: Compilation failure:
[ERROR]
/Volumes/Zoom/code/maven-bugs/mng-5121-a/src/main/java/testing/Badness.java:[3,19]
package javax.inject does not exist
[ERROR]
/Volumes/Zoom/code/maven-bugs/mng-5121-a/src/main/java/testing/Badness.java:[7,27]
cannot find symbol
which matches the problem as described. When I remove the dependency loop, it
prints out many "[WARNING] The POM for io.trumpet.components:tc-config:jar:4.0
is missing, no dependency information available" but compiles and runs
successfully.
Additionally, downloading the new aether jars as you suggest fixed both the
test case I had and Henning's test case.
So I am suspecting that it is actually the same problem, and that it is indeed
fixed with a new version of aether - do you have any other reason to believe it
is not?
was (Author: stevenschlansker):
I downloaded Henning's POM file, and tested it locally. With the versions
that included the same dependency loop, the compile fails with
Compilation failure: Compilation failure:
[ERROR]
/Volumes/Zoom/code/maven-bugs/mng-5121-a/src/main/java/testing/Badness.java:[3,19]
package javax.inject does not exist
[ERROR]
/Volumes/Zoom/code/maven-bugs/mng-5121-a/src/main/java/testing/Badness.java:[7,27]
cannot find symbol
which matches the problem as described. When I remove the dependency loop, it
prints out many "[WARNING] The POM for io.trumpet.components:tc-config:jar:4.0
is missing, no dependency information available" but compiles and runs
successfully.
Additionally, downloading the new aether jars as you suggest fixed both the
test case I had and Henning's test case.
So I am suspecting that it is actually the same problem - do you have any other
reason to believe it is not?
> maven seems to lose transitive dependencies from the list of compilation
> dependencies
> -------------------------------------------------------------------------------------
>
> Key: MNG-5121
> URL: https://jira.codehaus.org/browse/MNG-5121
> Project: Maven 2 & 3
> Issue Type: Bug
> Components: Dependencies
> Affects Versions: 3.0.1, 3.0.2, 3.0.3
> Environment: Fedora Linux, Sun JDK 1.6.0_24, MacOS X 10.6.7, AppleJDK
> 1.6.0_24
> Reporter: Henning Schmiedehausen
> Priority: Blocker
> Attachments: build_failed.log, build_successful.log, maven-pom.xml,
> mng-5121.tgz
>
>
> See the attached build logs "build_failed.log" and "build_succesful.log".
> They were both created from using the attached POM. The only difference is
> that in the successful build the dependency
> <dependency>
>
> <groupId>com.google.inject</groupId>
>
> <artifactId>guice</artifactId>
>
> <version>3.0</version>
>
> </dependency>
> is moved to the very top of the dependency list. When diffing the two build
> logs, the most important difference is that in the failed log maven picks up
> these dependencies:
> [DEBUG] com.google.inject:guice:jar:3.0:compile
> while in the successful build, the same dependency looks like this:
> [DEBUG] com.google.inject:guice:jar:3.0:compile
>
> [DEBUG] javax.inject:javax.inject:jar:1:compile
>
> [DEBUG] aopalliance:aopalliance:jar:1.0:
> This translates for the successful build into:
> [DEBUG] Classpath:
> [/Users/henning/private/source/services/thetargetproject/target/classes
>
> /Users/henning/.m2/repository/com/google/inject/guice/3.0/guice-3.0.jar
>
>
> /Users/henning/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar
>
> [...]
> and for the failed build:
> [DEBUG] Classpath: [...]
> /Users/henning/.m2/repository/com/google/inject/guice/3.0/guice-3.0.jar
>
>
> [...]
> (note that even for the successful build, the aopalliance dependency still
> got dropped).
> This behaviour started with maven 3.x, all permutations of the dependencies
> build fine with maven 2.2.1
> This problem can be reproduced in all maven 3.0.x versions (.1, .2 and .3).
> In both cases, the transitive dependencies of guice 3.0
> (javax.inject:javax.inject and aopalliance:aopalliance) should always be
> present.
> The same behaviour occurs in the exec-maven-plugin which uses the runtime
> dependency path to execute java code.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira