DependencyFilesets Task

This task will create fileset objects containing the Maven project dependencies. This can be used access specific dependency artifacts, or to operate on a set of dependency artifacts. Each artifact will be assigned a fileset ID in the form [prefix]groupId:artifactId:[classifier]:type. A dependency on a junit jar would be given a fileset ID of junit:junit:jar.

In addition, a single fileset containing all the project dependencies will be created using the default ID maven.project.dependencies

Task Parameters

Attribute Description Required
prefix String to prepend to all fileset IDs No, defaults to empty string
projectDependenciesId RefId for the fileset containing all project dependencies No, defaults to "maven.project.dependencies
scopes Comma separated list of artifact scopes to include No, defaults to all artifacts
types Comma separated list of artifact types to include No, defaults to all artifacts


This example shows how to access individual dependencies and the combined dependency fileset.

                <dependencyfilesets prefix="mydeps."/>
                <mkdir dir="target/dependencies"/>
                <copy todir="target/dependencies">
                  <fileset refid="mydeps.junit:junit:jar"/>
                  <fileset refid=""/>
                <mkdir dir="target/dependencies2"/>
                <copy todir="target/dependencies2" flatten="true">
                  <fileset refid="mydeps.maven.project.dependencies"/>