Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-3072

Dependency with lower version number is chosen

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.0.6
    • None
    • Dependencies
    • None

    Description

      My test application tries to create a spring org.springframework.context.ApplicationContext.

      This fails because of a
      java.lang.NoClassDefFoundError: org/springframework/beans/factory/support/ConfigurableBeanFactoryUtils

      This class is included in org.springframework:spring-context:1.2.8 but not in version 2.0.6 which I am using.
      Version 1.2.8 is a dependency for e.g org.apache.axis2:axis2-kernel.

      Maven chooses version 1.2.8. Running with option -X one can see the line
      [DEBUG] org.springframework:spring-context:jar:2.0.6:compile (removed - nearer found: 1.2.8)

      Surprisingly if the cglib dependency in my test project is commented version 2.0.6 is chosen.

      (The test project is called surefire-bug because I first thought it had to do with the surefire-plugin and was too lazy to rename everything.)

      Attachments

        1. surefire-bug.tar.gz
          2 kB
          Achim Abeling

        Issue Links

          Activity

            People

              carlos Carlos Sanchez Gonzalez
              aabeling Achim Abeling
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: