public abstract class AbstractDependencyMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected org.codehaus.plexus.archiver.manager.ArchiverManager |
archiverManager
To look up Archiver/UnArchiver implementations
|
protected org.apache.maven.artifact.resolver.ArtifactCollector |
artifactCollector
Artifact collector, needed to resolve dependencies.
|
protected org.apache.maven.artifact.metadata.ArtifactMetadataSource |
artifactMetadataSource |
protected org.apache.maven.artifact.factory.ArtifactFactory |
factory
Used to look up Artifacts in the remote repository.
|
protected boolean |
ignorePermissions
ignore to set file permissions when unpacking a dependency
|
protected boolean |
outputAbsoluteArtifactFilename
Output absolute filename for resolved artifacts
|
protected org.apache.maven.project.MavenProject |
project
POM
|
protected List<org.apache.maven.project.MavenProject> |
reactorProjects
Contains the full list of projects in the reactor.
|
protected List<org.apache.maven.artifact.repository.ArtifactRepository> |
remoteRepos
List of Remote Repositories used by the resolver
|
protected org.apache.maven.artifact.resolver.ArtifactResolver |
resolver
Used to look up Artifacts in the remote repository.
|
protected boolean |
silent
If the plugin should be silent.
|
protected boolean |
useJvmChmod
will use the jvm chmod, this is available for user and all level group level will be ignored
|
| 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.artifact.resolver.ArtifactCollector |
getArtifactCollector() |
org.apache.maven.artifact.metadata.ArtifactMetadataSource |
getArtifactMetadataSource() |
org.apache.maven.artifact.factory.ArtifactFactory |
getFactory() |
protected org.apache.maven.artifact.repository.ArtifactRepository |
getLocal() |
org.apache.maven.plugin.logging.Log |
getLog() |
org.apache.maven.project.MavenProject |
getProject() |
List<org.apache.maven.artifact.repository.ArtifactRepository> |
getRemoteRepos() |
org.apache.maven.artifact.resolver.ArtifactResolver |
getResolver() |
boolean |
isSkip() |
boolean |
isUseJvmChmod() |
void |
setArchiverManager(org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager) |
void |
setArtifactCollector(org.apache.maven.artifact.resolver.ArtifactCollector theArtifactCollector) |
void |
setArtifactMetadataSource(org.apache.maven.artifact.metadata.ArtifactMetadataSource theArtifactMetadataSource) |
void |
setFactory(org.apache.maven.artifact.factory.ArtifactFactory factory) |
void |
setLocal(org.apache.maven.artifact.repository.ArtifactRepository local) |
void |
setRemoteRepos(List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepos) |
void |
setResolver(org.apache.maven.artifact.resolver.ArtifactResolver resolver) |
void |
setSkip(boolean skip) |
void |
setUseJvmChmod(boolean useJvmChmod) |
protected void |
unpack(org.apache.maven.artifact.Artifact artifact,
File location) |
protected void |
unpack(org.apache.maven.artifact.Artifact artifact,
File location,
String includes,
String excludes)
Unpacks the archive file.
|
@Component protected org.apache.maven.artifact.factory.ArtifactFactory factory
@Component protected org.apache.maven.artifact.resolver.ArtifactResolver resolver
@Component(role=org.apache.maven.artifact.resolver.ArtifactCollector.class) protected org.apache.maven.artifact.resolver.ArtifactCollector artifactCollector
@Component(role=org.apache.maven.artifact.metadata.ArtifactMetadataSource.class,
hint="maven")
protected org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource
@Parameter(defaultValue="${project.remoteArtifactRepositories}",
readonly=true,
required=true)
protected List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepos
@Component protected org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
@Parameter(property="dependency.useJvmChmod",
defaultValue="true")
protected boolean useJvmChmod
will use the jvm chmod, this is available for user and all level group level will be ignored
since 2.6 is on by default@Parameter(property="dependency.ignorePermissions",
defaultValue="false")
protected boolean ignorePermissions
@Parameter(defaultValue="${project}",
readonly=true,
required=true)
protected org.apache.maven.project.MavenProject project
@Parameter(defaultValue="${reactorProjects}",
readonly=true)
protected List<org.apache.maven.project.MavenProject> reactorProjects
@Parameter(property="silent",
defaultValue="false")
protected boolean silent
@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.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected abstract void doExecute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionpublic org.apache.maven.plugin.logging.Log getLog()
getLog in interface org.apache.maven.plugin.MojogetLog in class org.apache.maven.plugin.AbstractMojopublic 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)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void unpack(org.apache.maven.artifact.Artifact artifact,
File location,
String includes,
String excludes)
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,
**/*.propertiesexcludes - Comma separated list of file patterns to exclude i.e. **/*.xml,
**/*.propertiesorg.apache.maven.plugin.MojoExecutionExceptionpublic org.apache.maven.artifact.factory.ArtifactFactory getFactory()
public void setFactory(org.apache.maven.artifact.factory.ArtifactFactory factory)
factory - The factory to set.public org.apache.maven.project.MavenProject getProject()
protected org.apache.maven.artifact.repository.ArtifactRepository getLocal()
public void setLocal(org.apache.maven.artifact.repository.ArtifactRepository local)
local - The local to set.public List<org.apache.maven.artifact.repository.ArtifactRepository> getRemoteRepos()
public void setRemoteRepos(List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepos)
remoteRepos - The remoteRepos to set.public org.apache.maven.artifact.resolver.ArtifactResolver getResolver()
public void setResolver(org.apache.maven.artifact.resolver.ArtifactResolver resolver)
resolver - The resolver to set.public void setArchiverManager(org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager)
archiverManager - The archiverManager to set.public org.apache.maven.artifact.resolver.ArtifactCollector getArtifactCollector()
public void setArtifactCollector(org.apache.maven.artifact.resolver.ArtifactCollector theArtifactCollector)
theArtifactCollector - The artifactCollector to set.public org.apache.maven.artifact.metadata.ArtifactMetadataSource getArtifactMetadataSource()
public void setArtifactMetadataSource(org.apache.maven.artifact.metadata.ArtifactMetadataSource theArtifactMetadataSource)
theArtifactMetadataSource - The artifactMetadataSource to set.public boolean isUseJvmChmod()
public void setUseJvmChmod(boolean useJvmChmod)
public boolean isSkip()
public void setSkip(boolean skip)
Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.