Class UnpackDependenciesMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.dependency.AbstractDependencyMojo
org.apache.maven.plugins.dependency.fromDependencies.AbstractDependencyFilterMojo
org.apache.maven.plugins.dependency.fromDependencies.AbstractFromDependenciesMojo
org.apache.maven.plugins.dependency.fromDependencies.UnpackDependenciesMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="unpack-dependencies",
requiresDependencyResolution=TEST,
defaultPhase=PROCESS_SOURCES,
threadSafe=true)
public class UnpackDependenciesMojo
extends AbstractFromDependenciesMojo
Goal that unpacks the project dependencies from the repository to a defined location.
- Since:
- 1.0
- Author:
- Brian Fox
-
Field Summary
Fields inherited from class org.apache.maven.plugins.dependency.fromDependencies.AbstractFromDependenciesMojo
failOnMissingClassifierArtifact, outputDirectory, stripClassifier, stripType, stripVersion, useRepositoryLayout, useSubDirectoryPerArtifact, useSubDirectoryPerScope, useSubDirectoryPerType
Fields inherited from class org.apache.maven.plugins.dependency.fromDependencies.AbstractDependencyFilterMojo
classifier, excludeArtifactIds, excludeClassifiers, excludeGroupIds, excludeScope, excludeTransitive, excludeTypes, includeArtifactIds, includeClassifiers, includeGroupIds, includeScope, includeTypes, markersDirectory, overWriteIfNewer, overWriteReleases, overWriteSnapshots, prependGroupId, type
Fields inherited from class org.apache.maven.plugins.dependency.AbstractDependencyMojo
reactorProjects, session
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Main entry into mojo.org.codehaus.plexus.components.io.filemappers.FileMapper[]
protected org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter
Return anArtifactsFilter
indicating which artifacts must be filtered out.void
setEncoding
(String encoding) void
setExcludes
(String excludes) void
setFileMappers
(org.codehaus.plexus.components.io.filemappers.FileMapper[] fileMappers) void
setIncludes
(String includes) Methods inherited from class org.apache.maven.plugins.dependency.fromDependencies.AbstractFromDependenciesMojo
getOutputDirectory, isFailOnMissingClassifierArtifact, isStripType, isStripVersion, isUseRepositoryLayout, isUseSubDirectoryPerArtifact, isUseSubDirectoryPerScope, isUseSubDirectoryPerType, setFailOnMissingClassifierArtifact, setOutputDirectory, setStripType, setStripVersion, setUseRepositoryLayout, setUseSubDirectoryPerArtifact, setUseSubDirectoryPerScope, setUseSubDirectoryPerType
Methods inherited from class org.apache.maven.plugins.dependency.fromDependencies.AbstractDependencyFilterMojo
filterMarkedDependencies, getDependencyResolver, getDependencySets, getDependencySets, getMarkersDirectory, getRepositoryManager, getResolvedDependencies, getResolverUtil, isPrependGroupId, setMarkersDirectory, setPrependGroupId
Methods inherited from class org.apache.maven.plugins.dependency.AbstractDependencyMojo
execute, getProject, isSilent, isSkip, newResolveArtifactProjectBuildingRequest, newResolvePluginProjectBuildingRequest, setSilent, setSkip
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
UnpackDependenciesMojo
public UnpackDependenciesMojo()
-
-
Method Details
-
doExecute
protected void doExecute() throws org.apache.maven.plugin.MojoExecutionExceptionMain entry into mojo. This method gets the dependencies and iterates through each one passing it to DependencyUtil.unpackFile().- Specified by:
doExecute
in classAbstractDependencyMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
- with a message if an error occurs.- See Also:
-
getMarkedArtifactFilter
protected org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter getMarkedArtifactFilter()Description copied from class:AbstractDependencyFilterMojo
Return anArtifactsFilter
indicating which artifacts must be filtered out.- Specified by:
getMarkedArtifactFilter
in classAbstractDependencyFilterMojo
- Returns:
- an
ArtifactsFilter
indicating which artifacts must be filtered out.
-
getExcludes
- Returns:
- Returns a comma separated list of excluded items
-
setExcludes
- Parameters:
excludes
- A comma separated list of items to exclude i.e.**\/*.xml, **\/*.properties
-
getIncludes
- Returns:
- Returns a comma separated list of included items
-
setIncludes
- Parameters:
includes
- A comma separated list of items to include i.e.**\/*.xml, **\/*.properties
-
setEncoding
- Parameters:
encoding
- The encoding to set.- Since:
- 3.0
-
getEncoding
- Returns:
- Returns the encoding.
- Since:
- 3.0
-
getFileMappers
public org.codehaus.plexus.components.io.filemappers.FileMapper[] getFileMappers()- Returns:
FileMapper
s to be used for rewriting each target path, ornull
if no rewriting shall happen.- Since:
- 3.1.2
-
setFileMappers
public void setFileMappers(org.codehaus.plexus.components.io.filemappers.FileMapper[] fileMappers) - Parameters:
fileMappers
-FileMapper
s to be used for rewriting each target path, ornull
if no rewriting shall happen.- Since:
- 3.1.2
-