maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dion Gillard <dion.gill...@gmail.com>
Subject Re: Multiple dependencies with the same id but different types
Date Wed, 01 Sep 2004 22:30:30 GMT
This is a known issue.

On Wed,  1 Sep 2004 17:24:15 -0300, Felipe Leme <maven@felipeal.net> wrote:
> Hi all,
> 
> Here I am again without another weird issue (sorry if it was discussed before, but I
didn't find it on Jira/eyebrowse).
> 
> Is there a known limitation that a project can't have more than one dependency with the
same id but different types?
> 
> Before someone shouts 'use multi-project', let me explain my problem first.
> 
> I have a project that generates a Resource Adapter/Connector (from the JCA API).  So,
the main artifact for this project is a RAR, but it also generates a JAR (as other projects
that uses the connector at runtime also needs to have access to its API at compiletime) and
a ZIP with the JBoss descriptors (in order to deploy the adapter, it's necessary to deploy
a descriptor too). Now I have another project that depends on that connector. So, in order
to compile that project, I need a dependency on the JAR, and that's fine. But if I want to
test this new project using cactus, I need to deploy the RAR and the descriptors on JBoss
before runnning Cactus and hence define a preGoal for cactus:test similar to this:
> 
>         <j:forEach var="lib" items="${pom.artifacts}">
>            <j:set var="dep" value="${lib.dependency}"/>
>            <j:set var="depType" value="${dep.type}"/>
>                <j:choose>
>                    <j:when test="${depType=='rar'}">
>                        <!-- deploy the rar on JBoss -->
>                         <copy file="${fileToDeploy}" todir="${deployDir}"/>
>                    </j:when>
>                    <j:when test="${depType=='zip'}">
>                        <!-- unzip the descriptors and later deploy then on JBoss -->
>                         <unzip dest="${maven.build.dir}/descriptors" src="${fileToDeploy}"/>
>                    </j:when>
>                </j:choose>
>            </j:if>
>         </j:forEach>
> 
> But that piece of code does not work, as the iterator returns only one dependency for
that id, out of 3 defined at the POM (jar, rar and zip).
> 
> So, what do you guys thinks? Is this a bug or a known Maven limitation? If that's a limitation,
where should I change the code in order to create a customized Maven that works as desired
(I'm not that familiar with Maven core yet, specially regarding the magical xml-to-object
transformations :-)?
> 
> Regards,
> 
> Felipe
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 


-- 
http://www.multitask.com.au/people/dion/

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


Mime
View raw message