Class UnpackMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.dependency.AbstractDependencyMojo
org.apache.maven.plugins.dependency.fromConfiguration.AbstractFromConfigurationMojo
org.apache.maven.plugins.dependency.fromConfiguration.UnpackMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="unpack",
defaultPhase=PROCESS_SOURCES,
requiresProject=false,
threadSafe=true)
public class UnpackMojo
extends AbstractFromConfigurationMojo
Goal that retrieves a list of artifacts from the repository and unpacks them in a defined location.
- Since:
- 1.0
- Author:
- Brian Fox
-
Field Summary
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 List
<ArtifactItem> getProcessedArtifactItems
(boolean removeVersion) void
setExcludes
(String excludes) void
setFileMappers
(org.codehaus.plexus.components.io.filemappers.FileMapper[] fileMappers) void
setIncludes
(String includes) void
setMarkersDirectory
(File theMarkersDirectory) Methods inherited from class org.apache.maven.plugins.dependency.fromConfiguration.AbstractFromConfigurationMojo
getArtifact, getArtifactItems, getOutputDirectory, getProcessedArtifactItems, isOverWriteIfNewer, isOverWriteReleases, isOverWriteSnapshots, setArtifact, setArtifactItems, setLocalRepositoryDirectory, setOutputDirectory, setOverWriteIfNewer, setOverWriteReleases, setOverWriteSnapshots, verifyRequirements
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
-
UnpackMojo
public UnpackMojo()
-
-
Method Details
-
doExecute
protected void doExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionMain entry into mojo. This method gets the ArtifactItems and iterates through each one passing it to unpackArtifact.- Specified by:
doExecute
in classAbstractDependencyMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
- with a message if an error occurs.org.apache.maven.plugin.MojoFailureException
-MojoFailureException
- See Also:
-
getProcessedArtifactItems
protected List<ArtifactItem> getProcessedArtifactItems(boolean removeVersion) throws org.apache.maven.plugin.MojoExecutionException - Parameters:
removeVersion
- removeVersion.- Returns:
- list of
ArtifactItem
- Throws:
org.apache.maven.plugin.MojoExecutionException
- in case of an error.
-
getMarkersDirectory
- Returns:
- Returns the markersDirectory.
-
setMarkersDirectory
- Parameters:
theMarkersDirectory
- The markersDirectory to set.
-
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
-
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
-