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 AbstractFromDependenciesMojo
failOnMissingClassifierArtifact, outputDirectory, stripClassifier, stripType, stripVersion, useRepositoryLayout, useSubDirectoryPerArtifact, useSubDirectoryPerScope, useSubDirectoryPerTypeFields inherited from class AbstractDependencyFilterMojo
classifier, excludeArtifactIds, excludeClassifiers, excludeGroupIds, excludeScope, excludeTransitive, excludeTypes, includeArtifactIds, includeClassifiers, includeGroupIds, includeScope, includeTypes, markersDirectory, overWriteIfNewer, overWriteReleases, overWriteSnapshots, prependGroupId, typeFields inherited from class AbstractDependencyMojo
sessionFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
ConstructorsConstructorDescriptionUnpackDependenciesMojo(org.apache.maven.execution.MavenSession session, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.project.MavenProject project, ResolverUtil resolverUtil, org.apache.maven.project.ProjectBuilder projectBuilder, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, UnpackUtil unpackUtil) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidMain entry into mojo.org.codehaus.plexus.components.io.filemappers.FileMapper[]protected org.apache.maven.shared.artifact.filter.collection.ArtifactsFilterReturn anArtifactsFilterindicating which artifacts must be filtered out.voidsetEncoding(String encoding) voidsetExcludes(String excludes) voidsetFileMappers(org.codehaus.plexus.components.io.filemappers.FileMapper[] fileMappers) voidsetIncludes(String includes) Methods inherited from class AbstractFromDependenciesMojo
getOutputDirectory, isFailOnMissingClassifierArtifact, isStripType, isStripVersion, isUseRepositoryLayout, isUseSubDirectoryPerArtifact, isUseSubDirectoryPerScope, isUseSubDirectoryPerType, setFailOnMissingClassifierArtifact, setOutputDirectory, setStripType, setStripVersion, setUseRepositoryLayout, setUseSubDirectoryPerArtifact, setUseSubDirectoryPerScope, setUseSubDirectoryPerTypeMethods inherited from class AbstractDependencyFilterMojo
filterMarkedDependencies, getDependencySets, getDependencySets, getMarkersDirectory, getResolvedDependencies, getResolverUtil, isPrependGroupId, setMarkersDirectory, setPrependGroupIdMethods inherited from class AbstractDependencyMojo
execute, getProject, isSilent, isSkip, setSilent, setSkipMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
UnpackDependenciesMojo
@Inject public UnpackDependenciesMojo(org.apache.maven.execution.MavenSession session, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.project.MavenProject project, ResolverUtil resolverUtil, org.apache.maven.project.ProjectBuilder projectBuilder, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, UnpackUtil unpackUtil)
-
-
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:
doExecutein 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:AbstractDependencyFilterMojoReturn anArtifactsFilterindicating which artifacts must be filtered out.- Specified by:
getMarkedArtifactFilterin classAbstractDependencyFilterMojo- Returns:
- an
ArtifactsFilterindicating 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:
FileMappers to be used for rewriting each target path, ornullif no rewriting shall happen- Since:
- 3.1.2
-
setFileMappers
public void setFileMappers(org.codehaus.plexus.components.io.filemappers.FileMapper[] fileMappers) - Parameters:
fileMappers-FileMappers to be used for rewriting each target path, ornullif no rewriting shall happen- Since:
- 3.1.2
-