Perhaps use Maven Ant Tasks .
As shown at http://maven.apache.org/ant-tasks/examples/dependencies.html Can list dependencies in ant, and also do things like copy them
I think the section Using FileSets and the Mapper version covers your needs.
You can use the filesId file, which will give you a link to a set of files that can be used to copy files to a specific location. For example, to populate WEB-INF / lib with your dependencies, you can use the following:
<artifact:dependencies filesetId="dependency.fileset" useScope="runtime"> <dependency groupId="junit" artifactId="junit" version="3.8.2" scope="test"/> </artifact:dependencies> <copy todir="${webapp.output}/WEB-INF/lib"> <fileset refid="dependency.fileset" /> <mapper type="flatten" /> </copy>
source share