Package org.apache.maven.ant.tasks
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The default project dependencies id.private String
The project ref Id of the project being used.private String
The string to prepend to all dependency filesets.private String
The id to store the dependencies fileset.private String
A comma separated list of dependency scopes to include.private String
A comma separated list of artifact types to include.Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
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.getTypes()
void
setMavenProjectId
(String mavenProjectId) void
Prefix to be added to each of the dependency filesets.void
setProjectDependenciesId
(String projectDependenciesId) void
void
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Field Details
-
DEFAULT_PROJECT_DEPENDENCIES_ID
The default project dependencies id.- See Also:
-
mavenProjectId
The project ref Id of the project being used. -
projectDependenciesId
The id to store the dependencies fileset. -
prefix
The string to prepend to all dependency filesets. -
types
A comma separated list of artifact types to include. -
scopes
A comma separated list of dependency scopes to include.
-
-
Constructor Details
-
DependencyFilesetsTask
public DependencyFilesetsTask()Create instance.
-
-
Method Details
-
getProjectDependenciesId
- Returns:
projectDependenciesId
-
setProjectDependenciesId
- Parameters:
projectDependenciesId
-projectDependenciesId
-
execute
public void execute()- Overrides:
execute
in classorg.apache.tools.ant.Task
-
getMavenProjectId
- Returns:
mavenProjectId
-
setMavenProjectId
- Parameters:
mavenProjectId
-mavenProjectId
-
getPrefix
- Returns:
prefix
-
setPrefix
Prefix to be added to each of the dependency filesets. Default is empty string.- Parameters:
prefix
-prefix
-
getTypes
- Returns:
types
-
setTypes
- Parameters:
types
-types
-
getScopes
- Returns:
scopes
-
setScopes
- 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.
-