Class DependencyFilesetsTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.maven.ant.tasks.DependencyFilesetsTask
All Implemented Interfaces:
Cloneable

public class DependencyFilesetsTask extends org.apache.tools.ant.Task
Ant task which create a fileset for each dependency in a Maven project, and a fileset containing all selected dependencies.
  • Field Details

    • DEFAULT_PROJECT_DEPENDENCIES_ID

      public static final String DEFAULT_PROJECT_DEPENDENCIES_ID
      The default project dependencies id.
      See Also:
    • mavenProjectId

      private String mavenProjectId
      The project ref Id of the project being used.
    • projectDependenciesId

      private String projectDependenciesId
      The id to store the dependencies fileset.
    • prefix

      private String prefix
      The string to prepend to all dependency filesets.
    • types

      private String types
      A comma separated list of artifact types to include.
    • scopes

      private String scopes
      A comma separated list of dependency scopes to include.
  • Constructor Details

    • DependencyFilesetsTask

      public DependencyFilesetsTask()
      Create instance.
  • Method Details

    • getProjectDependenciesId

      public String getProjectDependenciesId()
      Returns:
      projectDependenciesId
    • setProjectDependenciesId

      public void setProjectDependenciesId(String projectDependenciesId)
      Parameters:
      projectDependenciesId - projectDependenciesId
    • execute

      public void execute()
      Overrides:
      execute in class org.apache.tools.ant.Task
    • getMavenProjectId

      public String getMavenProjectId()
      Returns:
      mavenProjectId
    • setMavenProjectId

      public void setMavenProjectId(String mavenProjectId)
      Parameters:
      mavenProjectId - mavenProjectId
    • getPrefix

      public String getPrefix()
      Returns:
      prefix
    • setPrefix

      public void setPrefix(String prefix)
      Prefix to be added to each of the dependency filesets. Default is empty string.
      Parameters:
      prefix - prefix
    • getTypes

      public String getTypes()
      Returns:
      types
    • setTypes

      public void setTypes(String types)
      Parameters:
      types - types
    • getScopes

      public String getScopes()
      Returns:
      scopes
    • setScopes

      public void setScopes(String scopes)
      Parameters:
      scopes - scopes
    • filterArtifacts

      public Set<org.apache.maven.artifact.Artifact> filterArtifacts(Set<org.apache.maven.artifact.Artifact> artifacts)
      Filter a set of artifacts using the scopes and type filters.
      Parameters:
      artifacts - Artifact set.
      Returns:
      The set of filtered artifacts.