public abstract class AbstractDependencyMojo
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field and Description |
---|---|
protected boolean |
outputAbsoluteArtifactFilename
Output absolute filename for resolved artifacts
|
protected List<org.apache.maven.project.MavenProject> |
reactorProjects
Contains the full list of projects in the reactor.
|
protected org.apache.maven.execution.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() |
org.codehaus.plexus.archiver.manager.ArchiverManager |
getArchiverManager() |
org.apache.maven.project.MavenProject |
getProject() |
protected boolean |
isSilent() |
boolean |
isSkip() |
boolean |
isUseJvmChmod() |
org.apache.maven.project.ProjectBuildingRequest |
newResolveArtifactProjectBuildingRequest() |
protected org.apache.maven.project.ProjectBuildingRequest |
newResolvePluginProjectBuildingRequest() |
void |
setArchiverManager(org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager) |
void |
setSilent(boolean silent) |
void |
setSkip(boolean skip) |
void |
setUseJvmChmod(boolean useJvmChmod) |
protected void |
unpack(org.apache.maven.artifact.Artifact artifact,
File location,
String encoding,
org.codehaus.plexus.components.io.filemappers.FileMapper[] fileMappers) |
protected void |
unpack(org.apache.maven.artifact.Artifact artifact,
File location,
String includes,
String excludes,
String encoding,
org.codehaus.plexus.components.io.filemappers.FileMapper[] fileMappers)
Unpacks the archive file.
|
protected void |
unpack(org.apache.maven.artifact.Artifact artifact,
String type,
File location,
String includes,
String excludes,
String encoding,
org.codehaus.plexus.components.io.filemappers.FileMapper[] fileMappers) |
@Parameter(defaultValue="${reactorProjects}", readonly=true) protected List<org.apache.maven.project.MavenProject> reactorProjects
@Parameter(defaultValue="${session}", readonly=true, required=true) protected org.apache.maven.execution.MavenSession session
@Parameter(property="outputAbsoluteArtifactFilename", defaultValue="false") protected boolean outputAbsoluteArtifactFilename
public final void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected abstract void doExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
- MojoExecutionException
org.apache.maven.plugin.MojoFailureException
- MojoFailureException
public org.codehaus.plexus.archiver.manager.ArchiverManager getArchiverManager()
protected void copyFile(File artifact, File destFile) throws org.apache.maven.plugin.MojoExecutionException
artifact
- represents the file to copy.destFile
- file name of destination file.org.apache.maven.plugin.MojoExecutionException
- with a message if an error occurs.protected void unpack(org.apache.maven.artifact.Artifact artifact, File location, String encoding, org.codehaus.plexus.components.io.filemappers.FileMapper[] fileMappers) throws org.apache.maven.plugin.MojoExecutionException
artifact
- Artifact
location
- The location.encoding
- The encoding.fileMappers
- FileMapper
s to be used for rewriting each target path, or null
if no rewriting
shall happen.org.apache.maven.plugin.MojoExecutionException
- in case of an error.protected void unpack(org.apache.maven.artifact.Artifact artifact, File location, String includes, String excludes, String encoding, org.codehaus.plexus.components.io.filemappers.FileMapper[] fileMappers) throws org.apache.maven.plugin.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,
**/*.properties
excludes
- Comma separated list of file patterns to exclude i.e. **/*.xml,
**/*.properties
encoding
- Encoding of artifact. Set null
for default encoding.fileMappers
- FileMapper
s to be used for rewriting each target path, or null
if no rewriting
shall happen.org.apache.maven.plugin.MojoExecutionException
- In case of errors.protected void unpack(org.apache.maven.artifact.Artifact artifact, String type, File location, String includes, String excludes, String encoding, org.codehaus.plexus.components.io.filemappers.FileMapper[] fileMappers) throws org.apache.maven.plugin.MojoExecutionException
artifact
- Artifact
type
- The type.location
- The location.includes
- includes list.excludes
- excludes list.encoding
- the encoding.fileMappers
- FileMapper
s to be used for rewriting each target path, or null
if no rewriting
shall happen.org.apache.maven.plugin.MojoExecutionException
- in case of an error.public org.apache.maven.project.ProjectBuildingRequest newResolveArtifactProjectBuildingRequest()
protected org.apache.maven.project.ProjectBuildingRequest newResolvePluginProjectBuildingRequest()
public org.apache.maven.project.MavenProject getProject()
public void setArchiverManager(org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager)
archiverManager
- The archiverManager to set.public boolean isUseJvmChmod()
useJvmChmod
public void setUseJvmChmod(boolean useJvmChmod)
useJvmChmod
- useJvmChmod
public boolean isSkip()
skip
public void setSkip(boolean skip)
skip
- skip
protected final boolean isSilent()
silent
public void setSilent(boolean silent)
silent
- silent
Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.