Uploaded image for project: 'Maven Assembly Plugin'
  1. Maven Assembly Plugin
  2. MASSEMBLY-683

dependencySet includes different versions of same dependency when there is a pom relocation involved

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Auto Closed
    • 2.4
    • None
    • dependencySet
    • None
    • Embedded Maven 3.0.4 in Eclipse Kepler and Maven 3.0.4 on Jenkins. All on Windows 7 with Oracle JDK 7.

    Description

      When dependencySets are resolved, the assembly plugin handles different versions of the same artifact and provides the same result as Maven built-in dependency resolution does.

      But it fails if the artifact is relocated in its pom. The attached example shows this for xerces:xerces.

      The app depends on lib-a, which itself depends on xerces:xerces:1.4.4.
      The app also depends on lib-b, which itself depends on xerces:xerces:2.0.2, but that is relocated to xerces:xercesImpl.

      So the dependencySet on app contains xerces-1.4.4 and xercesImpl-2.0.2, causing problems on the classpath of the actual application.

      The demo contains a standard case with 2 different log4j version which is working fine.

      The demo also uses the maven-dependency-plugin that is able to resolve the dependencies correctly. Only xerces-1.4.4 goes into the target/dependency folder.

      Attachments

        1. acme.demo.zip
          27 kB
          Claus Schrammel

        Activity

          People

            khmarbaise Karl Heinz Marbaise
            f05fk Claus Schrammel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: