public abstract class AbstractDependencyMojo extends AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
outputAbsoluteArtifactFilename
Output absolute filename for resolved artifacts
|
protected List<MavenProject> |
reactorProjects
Contains the full list of projects in the reactor.
|
protected MavenSession |
session
The Maven session
|
| Constructor and Description |
|---|
AbstractDependencyMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
copyFile(File artifact,
File destFile)
Does the actual copy of the file and logging.
|
protected abstract void |
doExecute() |
void |
execute() |
ArchiverManager |
getArchiverManager() |
MavenProject |
getProject() |
protected boolean |
isSilent() |
boolean |
isSkip() |
boolean |
isUseJvmChmod() |
ProjectBuildingRequest |
newResolveArtifactProjectBuildingRequest() |
protected ProjectBuildingRequest |
newResolvePluginProjectBuildingRequest() |
void |
setArchiverManager(ArchiverManager archiverManager) |
void |
setSilent(boolean silent) |
void |
setSkip(boolean skip) |
void |
setUseJvmChmod(boolean useJvmChmod) |
protected void |
unpack(Artifact artifact,
File location,
String encoding,
FileMapper[] fileMappers) |
protected void |
unpack(Artifact artifact,
File location,
String includes,
String excludes,
String encoding,
FileMapper[] fileMappers)
Unpacks the archive file.
|
protected void |
unpack(Artifact artifact,
String type,
File location,
String includes,
String excludes,
String encoding,
FileMapper[] fileMappers) |
getLog, getPluginContext, setLog, setPluginContext@Parameter(defaultValue="${reactorProjects}", readonly=true) protected List<MavenProject> reactorProjects
@Parameter(defaultValue="${session}", readonly=true, required=true) protected MavenSession session
@Parameter(property="outputAbsoluteArtifactFilename", defaultValue="false") protected boolean outputAbsoluteArtifactFilename
public final void execute()
throws MojoExecutionException,
MojoFailureException
protected abstract void doExecute()
throws MojoExecutionException,
MojoFailureException
public ArchiverManager getArchiverManager()
protected void copyFile(File artifact, File destFile) throws MojoExecutionException
artifact - represents the file to copy.destFile - file name of destination file.MojoExecutionException - with a message if an error occurs.protected void unpack(Artifact artifact, File location, String encoding, FileMapper[] fileMappers) throws MojoExecutionException
artifact - Artifactlocation - The location.encoding - The encoding.fileMappers - FileMappers to be used for rewriting each target path, or null if no rewriting
shall happen.MojoExecutionException - in case of an error.protected void unpack(Artifact artifact, File location, String includes, String excludes, String encoding, FileMapper[] fileMappers) throws MojoExecutionException
artifact - File to be unpacked.location - Location where to put the unpacked files.includes - Comma separated list of file patterns to include i.e. **/.xml,
**/*.propertiesexcludes - Comma separated list of file patterns to exclude i.e. **/*.xml,
**/*.propertiesencoding - Encoding of artifact. Set null for default encoding.fileMappers - FileMappers to be used for rewriting each target path, or null if no rewriting
shall happen.MojoExecutionException - In case of errors.protected void unpack(Artifact artifact, String type, File location, String includes, String excludes, String encoding, FileMapper[] fileMappers) throws MojoExecutionException
artifact - Artifacttype - The type.location - The location.includes - includes list.excludes - excludes list.encoding - the encoding.fileMappers - FileMappers to be used for rewriting each target path, or null if no rewriting
shall happen.MojoExecutionException - in case of an error.public ProjectBuildingRequest newResolveArtifactProjectBuildingRequest()
protected ProjectBuildingRequest newResolvePluginProjectBuildingRequest()
public MavenProject getProject()
public void setArchiverManager(ArchiverManager archiverManager)
archiverManager - The archiverManager to set.public boolean isUseJvmChmod()
useJvmChmodpublic void setUseJvmChmod(boolean useJvmChmod)
useJvmChmod - useJvmChmodpublic boolean isSkip()
skippublic void setSkip(boolean skip)
skip - skipprotected final boolean isSilent()
silentpublic void setSilent(boolean silent)
silent - silentCopyright © 2002–2021 The Apache Software Foundation. All rights reserved.