Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-616

Maven Dependency Management is not used to determine artifact version

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0-alpha-2
    • 2.0.0-beta-1
    • Core
    • None

    Description

      We recently hit an issue with resolving some POMs with the ibiblio resolver and usepoms=true. The problem is that the version for a dependency can be stored in the dependency management section of a parent POM.

      The apache directory server is an example.

      http://repo1.maven.org/maven2/org/apache/directory/server/apacheds-server-main/1.5.0/apacheds-server-main-1.5.0.pom

      Note that the POM for the parent build artifact has the version information for the last 5 dependencies.

      The PomModuleDescriptorParser currently only builds a dependency descriptor if the groupId, artifactId and version are all set. So for the case of apache directory server, many of the transitive dependencies are ignored.

      I have been working on an extension to the PomModuleDescriptorParser that build the dependency management information at the end of the project/parent element by parsing the parent chain. Then if a dependency is found without a version, then the dependency management information is used. I attach the patch after some more testing.

      Attachments

        1. patch.txt
          16 kB
          Jim Bonanno
        2. patch2.txt
          36 kB
          Jim Bonanno

        Issue Links

          Activity

            People

              maartenc Maarten Coene
              bonanno Jim Bonanno
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: