You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ju...@bnpparibas.com on 2004/09/02 09:17:46 UTC
Réf. : Re: Multiple dependencies with the same idbut different types
isn't it
http://jira.codehaus.org/browse/MAVEN-1087
?
Julien
Extranet
dion.gillard@gmail.com - 02/09/2004 00:30
Veuillez répondre à dev@maven.apache.org
Pour : dev, maven
cc :
Objet : Re: Multiple dependencies with the same id but different types
This is a known issue.
On Wed, 1 Sep 2004 17:24:15 -0300, Felipe Leme <ma...@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
This message and any attachments (the "message") is
intended solely for the addressees and is confidential.
If you receive this message in error, please delete it and
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message.
BNP PARIBAS (and its subsidiaries) shall (will) not
therefore be liable for the message if modified.
---------------------------------------------
Ce message et toutes les pieces jointes (ci-apres le
"message") sont etablis a l'intention exclusive de ses
destinataires et sont confidentiels. Si vous recevez ce
message par erreur, merci de le detruire et d'en avertir
immediatement l'expediteur. Toute utilisation de ce
message non conforme a sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf
autorisation expresse. L'internet ne permettant pas
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce
message, dans l'hypothese ou il aurait ete modifie.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org