Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 1.0
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
Suppose you have these dependencies:
<!-- THE WAR DEPENDENCIES -->
<dependency>
<groupId>bigtribe</groupId>
<artifactId>user</artifactId>
<version>SNAPSHOT</version>
<type>war</type>
<properties><deploy>true</deploy></properties>
</dependency>
<!-- THE EJB DEPENDENCIES -->
<dependency>
<groupId>bigtribe</groupId>
<artifactId>user</artifactId>
<version>SNAPSHOT</version>
<type>ejb</type>
<properties><deploy>true</deploy></properties>
</dependency>
Only the first is actually downloaded. Reverse the order, the other file is downloaded.
Same problem when iterating through the dependencies, as shown below. Only one artifact is actually stored in the POM. I suppose if you had a tld and jar file with the same name in the same groupId, it also would fail. Total bummer.
<goal name="deploy" description="Copies the components to the jboss server" >
<ant:echo>Copying dependencies marked by property deploy=true to ${j2ee.lib.dir} and ${j2ee.deploy.dir}"</ant:echo>
<j:forEach var="lib" items="${pom.artifacts}">
<j:set var="dep" value="${lib.dependency}"/>
<j:set var="source" value="${lib.file}"/>
<j:if test="${dep.getProperty('deploy')=='true'}">
<j:choose>
<j:when test="${dep.type=='war' || dep.type=='ejb' || dep.type=='rar' || dep.type=='sar'}">
<copy todir="${j2ee.deploy.dir}" file="${lib.getFile()}" />
<echo>${lib.getFile()}</echo>
</j:when>
<j:when test="${dep.type=='jar' || dep.type==''}">
<copy todir="${j2ee.lib.dir}" file="${lib.getFile()}" />
</j:when>
</j:choose>
<echo>${dep.type}</echo>
</j:if>
</j:forEach>
</goal>
Issue Links
- duplicates
-
MAVEN-1087
Dependency type should participate in equals() and hashcode()
-
-
MAVEN-1365
Dependency Being Skipped
-
fix this duplicated issue