Message:

   The following issue has been resolved as DUPLICATE.

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/browse/MAVEN-1418

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MAVEN-1418
    Summary: A later dependency in project.xml with same name, different type is 
ignored
       Type: Bug

     Status: Resolved
   Priority: Major
 Resolution: DUPLICATE

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven
   Versions:
             1.0

   Assignee: 
   Reporter: Dan Greening

    Created: Sat, 7 Aug 2004 11:06 PM
    Updated: Sun, 8 Aug 2004 11:17 AM

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>


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to