maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Chamberlain" <>
Subject Maven ant tasks: Getting artefacts based on type
Date Fri, 08 Jan 2010 15:20:25 GMT


I'm using maven ant tasks as i'm doing a non-java build, but want to use
the power of dependencies.


I'm trying to get all the dependencies of type "zip" into a fileset.


Here is the POM:


<?xml version="1.0"?>
























The ant task is:

                <target name="build">

                                <artifact:pom id="maven.profiled.pom"
file="pom.xml" />

pathId="" type="zip">

refid="maven.profiled.pom" />


                                <property name="maven.dependencies"

                                <echo message="Zip dependencies:
${maven.dependencies}" />


pathId="" type="jar">

refid="maven.profiled.pom" />


                                <property name="maven.dependencies.jar"

                                <echo message=" Jar dependencies:
${maven.dependencies.jar}" />



I would expect both that jar and zip dependency to be printed out.
However it prints out nothing for the jar, but prints out the zip.

If I change the project packaging to jar, it prints out the jar, but not
the zip.

It seems as though the dependency mechanism takes into account the
packaging of the project before looking into dependencies. 


Is this the way it is supposed to work? Or am I using it wrong? How do I
get a filtered list of dependencies using ant tasks?


Thanks for your help,





  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message