@Mojo(name="copy-dependencies", requiresDependencyResolution=TEST, defaultPhase=PROCESS_SOURCES, threadSafe=true) public class CopyDependenciesMojo extends AbstractFromDependenciesMojo
| Modifier and Type | Field and Description | 
|---|---|
protected boolean | 
addParentPoms
Add parent poms to the list of copied dependencies (both current project pom parents and dependencies parents). 
 | 
protected boolean | 
copyPom
Also copy the pom of each artifact. 
 | 
protected boolean | 
ignorePermissions
not used in this goal 
 | 
protected org.apache.maven.artifact.installer.ArtifactInstaller | 
installer  | 
protected ArtifactRepositoryFactory | 
repositoryFactory  | 
protected boolean | 
useBaseVersion
Either append the artifact's baseVersion or uniqueVersion to the filename. 
 | 
protected boolean | 
useJvmChmod
not used in this goal 
 | 
failOnMissingClassifierArtifact, outputDirectory, stripClassifier, stripVersion, useRepositoryLayout, useSubDirectoryPerArtifact, useSubDirectoryPerScope, useSubDirectoryPerTypeclassifier, excludeArtifactIds, excludeClassifiers, excludeGroupIds, excludeScope, excludeTransitive, excludeTypes, includeArtifactIds, includeClassifiers, includeGroupIds, includeScope, includeTypes, markersDirectory, overWriteIfNewer, overWriteReleases, overWriteSnapshots, prependGroupId, typearchiverManager, artifactCollector, artifactMetadataSource, factory, outputAbsoluteArtifactFilename, project, reactorProjects, remoteRepos, resolver, silent| Constructor and Description | 
|---|
CopyDependenciesMojo()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
copyArtifact(Artifact artifact,
            boolean removeVersion,
            boolean prependGroupId,
            boolean useBaseVersion)
Copies the Artifact after building the destination file name if
 overridden. 
 | 
protected void | 
copyArtifact(Artifact artifact,
            boolean removeVersion,
            boolean prependGroupId,
            boolean useBaseVersion,
            boolean removeClassifier)
Copies the Artifact after building the destination file name if
 overridden. 
 | 
void | 
copyPoms(File destDir,
        Set<Artifact> artifacts,
        boolean removeVersion)
Copy the pom files associated with the artifacts. 
 | 
void | 
copyPoms(File destDir,
        Set<Artifact> artifacts,
        boolean removeVersion,
        boolean removeClassifier)
Copy the pom files associated with the artifacts. 
 | 
protected void | 
doExecute()
Main entry into mojo. 
 | 
protected ArtifactsFilter | 
getMarkedArtifactFilter()
Return an  
ArtifactsFilter indicating which artifacts must be filtered out. | 
protected Artifact | 
getResolvedPomArtifact(Artifact artifact)  | 
boolean | 
isCopyPom()  | 
void | 
setCopyPom(boolean copyPom)  | 
getOutputDirectory, isFailOnMissingClassifierArtifact, isStripVersion, isUseRepositoryLayout, isUseSubDirectoryPerArtifact, isUseSubDirectoryPerScope, isUseSubDirectoryPerType, setFailOnMissingClassifierArtifact, setOutputDirectory, setStripVersion, setUseRepositoryLayout, setUseSubDirectoryPerArtifact, setUseSubDirectoryPerScope, setUseSubDirectoryPerTypefilterMarkedDependencies, getClassifierTranslatedDependencies, getDependencySets, getDependencySets, getMarkersDirectory, getResolvedDependencies, isPrependGroupId, setMarkersDirectory, setPrependGroupIdcopyFile, execute, getArchiverManager, getArtifactCollector, getArtifactMetadataSource, getFactory, getLocal, getLog, getProject, getRemoteRepos, getResolver, isSkip, isUseJvmChmod, setArchiverManager, setArtifactCollector, setArtifactMetadataSource, setFactory, setLocal, setRemoteRepos, setResolver, setSkip, setUseJvmChmod, unpack, unpackgetPluginContext, setLog, setPluginContext@Parameter(property="mdep.copyPom", defaultValue="false") protected boolean copyPom
@Component protected org.apache.maven.artifact.installer.ArtifactInstaller installer
@Component protected ArtifactRepositoryFactory repositoryFactory
@Parameter(property="mdep.useBaseVersion", defaultValue="true") protected boolean useBaseVersion
AbstractFromDependenciesMojo.isStripVersion() is false.@Parameter(property="mdep.addParentPoms", defaultValue="false") protected boolean addParentPoms
@Parameter protected boolean useJvmChmod
@Parameter protected boolean ignorePermissions
protected void doExecute()
                  throws MojoExecutionException
doExecute in class AbstractDependencyMojoMojoExecutionException - with a message if an error occurs.#getDependencies, 
#copyArtifact(Artifact, boolean)protected void copyArtifact(Artifact artifact, boolean removeVersion, boolean prependGroupId, boolean useBaseVersion) throws MojoExecutionException
artifact - representing the object to be copied.removeVersion - specifies if the version should be removed from the file name
                       when copying.prependGroupId - specifies if the groupId should be prepend to the file while copying.useBaseVersion - specifies if the baseVersion of the artifact should be used instead of the version.MojoExecutionException - with a message if an error occurs.DependencyUtil#copyFile(File, File, Log), 
DependencyUtil.getFormattedFileName(Artifact, boolean)protected void copyArtifact(Artifact artifact, boolean removeVersion, boolean prependGroupId, boolean useBaseVersion, boolean removeClassifier) throws MojoExecutionException
artifact - representing the object to be copied.removeVersion - specifies if the version should be removed from the file name
                       when copying.prependGroupId - specifies if the groupId should be prepend to the file while copying.useBaseVersion - specifies if the baseVersion of the artifact should be used instead of the version.removeClassifier - specifies if the classifier should be removed from the file name when copying.MojoExecutionException - with a message if an error occurs.DependencyUtil#copyFile(File, File, Log), 
DependencyUtil.getFormattedFileName(Artifact, boolean)public void copyPoms(File destDir, Set<Artifact> artifacts, boolean removeVersion) throws MojoExecutionException
MojoExecutionExceptionpublic void copyPoms(File destDir, Set<Artifact> artifacts, boolean removeVersion, boolean removeClassifier) throws MojoExecutionException
MojoExecutionExceptionprotected ArtifactsFilter getMarkedArtifactFilter()
AbstractDependencyFilterMojoArtifactsFilter indicating which artifacts must be filtered out.getMarkedArtifactFilter in class AbstractDependencyFilterMojoArtifactsFilter indicating which artifacts must be filtered out.public boolean isCopyPom()
public void setCopyPom(boolean copyPom)
copyPom - - true if the pom of each artifact must be copiedCopyright © 2002–2014 The Apache Software Foundation. All rights reserved.