Maven
  1. Maven
  2. MNG-5121

maven seems to lose transitive dependencies from the list of compilation dependencies

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.0.1, 3.0.2, 3.0.3
    • Fix Version/s: 3.0.4
    • Component/s: Dependencies
    • Labels:
      None
    • Environment:
      Fedora Linux, Sun JDK 1.6.0_24, MacOS X 10.6.7, AppleJDK 1.6.0_24

      Description

      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.

      1. mng-5121.tgz
        2 kB
        Steven Schlansker
      2. maven-pom.xml
        6 kB
        Henning Schmiedehausen
      3. build_successful.log
        188 kB
        Henning Schmiedehausen
      4. build_failed.log
        104 kB
        Henning Schmiedehausen

        Activity

        Henning Schmiedehausen created issue -
        Steven Schlansker made changes -
        Field Original Value New Value
        Attachment mng-5121.tgz [ 56986 ]
        Jason van Zyl made changes -
        Assignee Jason van Zyl [ jason ]
        Henning Schmiedehausen made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 3.0.4 [ 17215 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 08:49:45 UTC 2015 [ 1428223785911 ]
        Mark Thomas made changes -
        Workflow jira [ 12715354 ] Default workflow, editable Closed status [ 12754901 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 21:45:26 UTC 2015 [ 1428270326204 ]
        Mark Thomas made changes -
        Workflow jira [ 12952785 ] Default workflow, editable Closed status [ 12990119 ]
        Mark Thomas made changes -
        Assignee jason lane [ jason ] Jason van Zyl [ jvanzyl ]

          People

          • Assignee:
            Jason van Zyl
            Reporter:
            Henning Schmiedehausen
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development