@Mojo(name="unpack", defaultPhase=PROCESS_SOURCES, requiresProject=false, threadSafe=true) public class UnpackMojo extends AbstractFromConfigurationMojo
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
artifact
The artifact to unpack from command line.
|
private java.lang.String |
excludes
A comma separated list of file patterns to exclude when unpacking the artifact.
|
private java.lang.String |
includes
A comma separated list of file patterns to include when unpacking the artifact.
|
private java.io.File |
markersDirectory
Directory to store flag files after unpack
|
outputAbsoluteArtifactFilename, reactorProjects, session
Constructor and Description |
---|
UnpackMojo() |
Modifier and Type | Method and Description |
---|---|
protected void |
doExecute()
Main entry into mojo.
|
java.lang.String |
getExcludes() |
java.lang.String |
getIncludes() |
(package private) ArtifactItemFilter |
getMarkedArtifactFilter(ArtifactItem item) |
java.io.File |
getMarkersDirectory() |
protected java.util.List<ArtifactItem> |
getProcessedArtifactItems(boolean removeVersion) |
void |
setExcludes(java.lang.String excludes) |
void |
setIncludes(java.lang.String includes) |
void |
setMarkersDirectory(java.io.File theMarkersDirectory) |
private void |
unpackArtifact(ArtifactItem artifactItem)
This method gets the Artifact object and calls DependencyUtil.unpackFile.
|
getArtifact, getArtifactItems, getOutputDirectory, getProcessedArtifactItems, isOverWriteIfNewer, isOverWriteReleases, isOverWriteSnapshots, setArtifact, setArtifactItems, setLocalRepositoryDirectory, setOutputDirectory, setOverWriteIfNewer, setOverWriteReleases, setOverWriteSnapshots, verifyRequirements
copyFile, execute, getArchiverManager, getProject, isSilent, isSkip, isUseJvmChmod, newResolveArtifactProjectBuildingRequest, setArchiverManager, setSilent, setSkip, setUseJvmChmod, unpack, unpack, unpack
@Parameter(defaultValue="${project.build.directory}/dependency-maven-plugin-markers") private java.io.File markersDirectory
@Parameter(property="mdep.unpack.includes") private java.lang.String includes
**/*.xml,**/*.properties
NOTE: Excludes patterns override the includes. (component code =
return isIncluded( name ) AND !isExcluded( name );
)@Parameter(property="mdep.unpack.excludes") private java.lang.String excludes
**/*.xml,**/*.properties
NOTE: Excludes patterns override the includes. (component code =
return isIncluded( name ) AND !isExcluded( name );
)@Parameter(property="artifact") private java.lang.String artifact
groupId:artifactId:version[:packaging[:classifier]]
. Use AbstractFromConfigurationMojo.artifactItems
within the POM
configuration.protected void doExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
doExecute
in class AbstractDependencyMojo
org.apache.maven.plugin.MojoExecutionException
- with a message if an error occurs.org.apache.maven.plugin.MojoFailureException
ArtifactItem
,
AbstractFromConfigurationMojo.getArtifactItems()
,
unpackArtifact(ArtifactItem)
private void unpackArtifact(ArtifactItem artifactItem) throws org.apache.maven.plugin.MojoExecutionException
artifactItem
- containing the information about the Artifact to unpack.org.apache.maven.plugin.MojoExecutionException
- with a message if an error occurs.AbstractFromConfigurationMojo.getArtifact(org.apache.maven.plugins.dependency.fromConfiguration.ArtifactItem)
ArtifactItemFilter getMarkedArtifactFilter(ArtifactItem item)
getMarkedArtifactFilter
in class AbstractFromConfigurationMojo
protected java.util.List<ArtifactItem> getProcessedArtifactItems(boolean removeVersion) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public java.io.File getMarkersDirectory()
public void setMarkersDirectory(java.io.File theMarkersDirectory)
theMarkersDirectory
- The markersDirectory to set.public java.lang.String getExcludes()
public void setExcludes(java.lang.String excludes)
excludes
- A comma separated list of items to exclude i.e. **\/*.xml, **\/*.propertiespublic java.lang.String getIncludes()
public void setIncludes(java.lang.String includes)
includes
- A comma separated list of items to include i.e. **\/*.xml, **\/*.properties