If no one can actually fix your problem, you can always build the
adapter jar in one project and package it into the rar in another, with
slightly different names. I would definitely prefer that someone
figure out how to have multiple dependencies such as you ask for.
thanks
david jencks
On Sep 1, 2004, at 1:24 PM, Felipe Leme 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]