You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Arnaud Heritier (JIRA)" <ji...@codehaus.org> on 2005/10/27 23:15:11 UTC

[jira] Closed: (MAVEN-1418) A later dependency in project.xml with same name, different type is ignored

     [ http://jira.codehaus.org/browse/MAVEN-1418?page=all ]
     
Arnaud Heritier closed MAVEN-1418:
----------------------------------


fix this duplicated issue

> A later dependency in project.xml with same name, different type is ignored
> ---------------------------------------------------------------------------
>
>          Key: MAVEN-1418
>          URL: http://jira.codehaus.org/browse/MAVEN-1418
>      Project: Maven
>         Type: Bug
>     Versions: 1.0
>     Reporter: Dan Greening

>
>
> 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>

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org