[
https://jira.jboss.org/jira/browse/EJBTHREE-1957?page=com.atlassian.jira....
]
jaikiran pai commented on EJBTHREE-1957:
----------------------------------------
Discussion on #maven:
(06:37:45 PM) Jaikiran: i just started playing with Maven 3.0 alpha-4 with our project
which works with 2.0.9 Maven right now
(06:38:05 PM) Jaikiran: looks like the dependency resolution has become stricter (by
default) in this version
(06:38:08 PM) Jaikiran: is that correct?
(06:38:15 PM) Jaikiran: i can no longer build my project
(06:38:45 PM) bentmann: Jaikiran: that doesn't tell me much about your actual problem
(06:39:00 PM) Jaikiran: bentmann: one sec, just collecting the logs to post :)
(06:39:08 PM) Jaikiran: post = pastebin
(06:40:26 PM) Jaikiran: 2 things stand out here
http://pastebin.com/m7b6b6eaa
(06:40:33 PM) Jaikiran: 1) the dependency resolution throws up an error
(06:41:08 PM) Jaikiran: 2) The error message does *not* replace the property values
(ex:{version.org.jboss.common.core})
(06:41:46 PM) Jaikiran: for the pom.xml that i am running this against, have a look at
http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/trunk/build/pom.xml
(06:42:00 PM) bentmann: there is no dependency resolution involved in the logs you posted,
your POMs simply contain duplicate <dependency> entries
(06:42:34 PM) bentmann: and the property values reflect the actual contents of the POM,
i.e. the string you might want to search for to fix the duplicate
(06:43:33 PM) Jaikiran: i see, just looked at the pom and indeed it has duplicate
dependency elements for the same artifact
(06:43:55 PM) Jaikiran: maven 2.0.x ignored that (probably used the higher version)?
(06:45:10 PM) bentmann: in fact, Maven 2.x used the last version defined, but retained the
order of the first declaration..
(06:48:04 PM) Jaikiran: this new implementation of showing up an error makes sense (when
the pom directly specifies multiple dependency versions of the same artifact)
pom.xml of jboss-ejb3-build specifies multiple dependency versions
for the same artifact(s)
-------------------------------------------------------------------------------------------
Key: EJBTHREE-1957
URL:
https://jira.jboss.org/jira/browse/EJBTHREE-1957
Project: EJB 3.0
Issue Type: Bug
Components: build
Reporter: jaikiran pai
Assignee: jaikiran pai
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
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira