Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-1957

pom.xml of jboss-ejb3-build specifies multiple dependency versions for the same artifact(s)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • build
    • None
    • jboss-ejb3-build:1.0.8

      While trying out Maven-3 (alpha-4) against our project, Maven-3 showed up that our pom.xml of the jboss-ejb3-build has duplicate dependency elements with different versions for the same artifact(s):
      ...
      <version.org.jboss.common.core>2.2.14.GA</version.org.jboss.common.core>
      ...
      <version.org.jboss.reflect>2.0.2.GA</version.org.jboss.reflect>
      ...
      <dependency>
      <groupId>org.jboss</groupId>
      <artifactId>jboss-common-core</artifactId>
      <version>2.2.5.GA</version>
      </dependency>
      ...
      <dependency>
      <groupId>org.jboss</groupId>
      <artifactId>jboss-reflect</artifactId>
      <version>2.0.0.CR1</version>
      </dependency>
      ...
      <!-- JBoss Common Core -->
      <dependency>
      <groupId>org.jboss</groupId>
      <artifactId>jboss-common-core</artifactId>
      <version>${version.org.jboss.common.core}</version>
      </dependency>

      <!-- JBoss Reflect -->
      <dependency>
      <groupId>org.jboss</groupId>
      <artifactId>jboss-reflect</artifactId>
      <version>${version.org.jboss.reflect}</version>
      </dependency>

      Notice that the pom declares dependency on jboss-common-core for 2 different versions (2.2.5.GA and 2.2.14.GA). Same is the case with jboss-reflect. Maven-2 doesn't show up this as an error (it should have), but Maven-3 rightly shows this as an error and fails to build:

      [ERROR] The build could not read 1 project -> [Help 1]
      [ERROR] The project org.jboss.ejb3:jboss-ejb3-build:1.0.8-SNAPSHOT (/home/jpai/business/jboss/wc/jbossas/projects/ejb3/trunk/build/pom.xml) has 2 errors
      [ERROR] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.jboss:jboss-common-core:jar -> version 2.2.5.GA vs ${version.org.jboss.common.core}
      [ERROR] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.jboss:jboss-reflect:jar -> version 2.0.0.CR1 vs ${version.org.jboss.reflect}
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

              jaikiran Jaikiran Pai (Inactive)
              jaikiran Jaikiran Pai (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: