|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.apache.maven.plugin.dependency.AbstractDependencyMojo
org.apache.maven.plugin.dependency.fromDependencies.AbstractDependencyFilterMojo
org.apache.maven.plugin.dependency.fromDependencies.AbstractFromDependenciesMojo
org.apache.maven.plugin.dependency.fromDependencies.CopyDependenciesMojo
@Mojo(name="copy-dependencies",
requiresDependencyResolution=TEST,
defaultPhase=PROCESS_SOURCES,
threadSafe=true)
public class CopyDependenciesMojoGoal that copies the project dependencies from the repository to a defined location.
| Field Summary | |
|---|---|
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 org.apache.maven.artifact.repository.ArtifactRepositoryFactory |
repositoryFactory
|
protected boolean |
useBaseVersion
Either append the artifact's baseVersion or uniqueVersion to the filename. |
protected boolean |
useJvmChmod
not used in this goal |
| Fields inherited from class org.apache.maven.plugin.dependency.fromDependencies.AbstractFromDependenciesMojo |
|---|
failOnMissingClassifierArtifact, outputDirectory, stripClassifier, stripVersion, useRepositoryLayout, useSubDirectoryPerArtifact, useSubDirectoryPerScope, useSubDirectoryPerType |
| Fields inherited from class org.apache.maven.plugin.dependency.fromDependencies.AbstractDependencyFilterMojo |
|---|
classifier, excludeArtifactIds, excludeClassifiers, excludeGroupIds, excludeScope, excludeTransitive, excludeTypes, includeArtifactIds, includeClassifiers, includeGroupIds, includeScope, includeTypes, markersDirectory, overWriteIfNewer, overWriteReleases, overWriteSnapshots, prependGroupId, type |
| Fields inherited from class org.apache.maven.plugin.dependency.AbstractDependencyMojo |
|---|
archiverManager, artifactCollector, artifactMetadataSource, factory, outputAbsoluteArtifactFilename, project, reactorProjects, remoteRepos, resolver, silent |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
CopyDependenciesMojo()
|
|
| Method Summary | |
|---|---|
protected void |
copyArtifact(org.apache.maven.artifact.Artifact artifact,
boolean removeVersion,
boolean prependGroupId,
boolean useBaseVersion)
Copies the Artifact after building the destination file name if overridden. |
protected void |
copyArtifact(org.apache.maven.artifact.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<org.apache.maven.artifact.Artifact> artifacts,
boolean removeVersion)
Copy the pom files associated with the artifacts. |
void |
copyPoms(File destDir,
Set<org.apache.maven.artifact.Artifact> artifacts,
boolean removeVersion,
boolean removeClassifier)
Copy the pom files associated with the artifacts. |
protected void |
doExecute()
Main entry into mojo. |
protected org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter |
getMarkedArtifactFilter()
Return an ArtifactsFilter indicating which artifacts must be filtered out. |
protected org.apache.maven.artifact.Artifact |
getResolvedPomArtifact(org.apache.maven.artifact.Artifact artifact)
|
boolean |
isCopyPom()
|
void |
setCopyPom(boolean copyPom)
|
| Methods inherited from class org.apache.maven.plugin.dependency.fromDependencies.AbstractFromDependenciesMojo |
|---|
getOutputDirectory, isFailOnMissingClassifierArtifact, isStripVersion, isUseRepositoryLayout, isUseSubDirectoryPerArtifact, isUseSubDirectoryPerScope, isUseSubDirectoryPerType, setFailOnMissingClassifierArtifact, setOutputDirectory, setStripVersion, setUseRepositoryLayout, setUseSubDirectoryPerArtifact, setUseSubDirectoryPerScope, setUseSubDirectoryPerType |
| Methods inherited from class org.apache.maven.plugin.dependency.fromDependencies.AbstractDependencyFilterMojo |
|---|
filterMarkedDependencies, getClassifierTranslatedDependencies, getDependencySets, getDependencySets, getMarkersDirectory, getResolvedDependencies, isPrependGroupId, setMarkersDirectory, setPrependGroupId |
| Methods inherited from class org.apache.maven.plugin.dependency.AbstractDependencyMojo |
|---|
copyFile, execute, getArchiverManager, getArtifactCollector, getArtifactMetadataSource, getFactory, getLocal, getLog, getProject, getRemoteRepos, getResolver, isSkip, isUseJvmChmod, setArchiverManager, setArtifactCollector, setArtifactMetadataSource, setFactory, setLocal, setRemoteRepos, setResolver, setSkip, setUseJvmChmod, unpack, unpack |
| Methods inherited from class org.apache.maven.plugin.AbstractMojo |
|---|
getPluginContext, setLog, setPluginContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Parameter(property="mdep.copyPom",
defaultValue="false")
protected boolean copyPom
@Component protected org.apache.maven.artifact.installer.ArtifactInstaller installer
@Component protected org.apache.maven.artifact.repository.ArtifactRepositoryFactory repositoryFactory
@Parameter(property="mdep.useBaseVersion",
defaultValue="true")
protected boolean useBaseVersion
AbstractFromDependenciesMojo.isStripVersion() is false.
@Parameter(defaultValue="false") protected boolean addParentPoms
@Parameter protected boolean useJvmChmod
@Parameter protected boolean ignorePermissions
| Constructor Detail |
|---|
public CopyDependenciesMojo()
| Method Detail |
|---|
protected void doExecute()
throws org.apache.maven.plugin.MojoExecutionException
doExecute in class AbstractDependencyMojoorg.apache.maven.plugin.MojoExecutionException - with a message if an error occurs.#getDependencies,
#copyArtifact(Artifact, boolean)
protected void copyArtifact(org.apache.maven.artifact.Artifact artifact,
boolean removeVersion,
boolean prependGroupId,
boolean useBaseVersion)
throws org.apache.maven.plugin.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.
org.apache.maven.plugin.MojoExecutionException - with a message if an error occurs.DependencyUtil#copyFile(File, File, Log),
DependencyUtil.getFormattedFileName(Artifact, boolean)
protected void copyArtifact(org.apache.maven.artifact.Artifact artifact,
boolean removeVersion,
boolean prependGroupId,
boolean useBaseVersion,
boolean removeClassifier)
throws org.apache.maven.plugin.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.
org.apache.maven.plugin.MojoExecutionException - with a message if an error occurs.DependencyUtil#copyFile(File, File, Log),
DependencyUtil.getFormattedFileName(Artifact, boolean)
public void copyPoms(File destDir,
Set<org.apache.maven.artifact.Artifact> artifacts,
boolean removeVersion)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public void copyPoms(File destDir,
Set<org.apache.maven.artifact.Artifact> artifacts,
boolean removeVersion,
boolean removeClassifier)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected org.apache.maven.artifact.Artifact getResolvedPomArtifact(org.apache.maven.artifact.Artifact artifact)
protected org.apache.maven.shared.artifact.filter.collection.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 copied
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||