jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 1
  • MAVEN-1418

A later dependency in project.xml with same name, different type is ignored

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major 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

Bug - A problem which impairs or prevents the functions of the product. MAVEN-1087 Dependency type should participate in equals() and hashcode()

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Bug - A problem which impairs or prevents the functions of the product. MAVEN-1365 Dependency Being Skipped

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Arnaud Heritier added a comment - 27/Oct/05 4:14 PM

fix this duplicated issue

Show
Arnaud Heritier added a comment - 27/Oct/05 4:14 PM fix this duplicated issue

People

  • Assignee:
    Unassigned
    Reporter:
    Dan Greening
Vote (0)
Watch (1)

Dates

  • Created:
    07/Aug/04 11:06 PM
    Updated:
    08/Mar/06 10:47 PM
    Resolved:
    08/Aug/04 11:17 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.