Class CopyMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugins.dependency.AbstractDependencyMojo
-
- org.apache.maven.plugins.dependency.fromConfiguration.AbstractFromConfigurationMojo
-
- org.apache.maven.plugins.dependency.fromConfiguration.CopyMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="copy", defaultPhase=PROCESS_SOURCES, requiresProject=false, threadSafe=true) public class CopyMojo extends AbstractFromConfigurationMojoGoal that copies a list of artifacts from the repository to defined locations.- Since:
- 1.0
- Author:
- Brian Fox
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanignorePermissionsnot used in this goalprotected booleanuseJvmChmodnot used in this goal-
Fields inherited from class org.apache.maven.plugins.dependency.AbstractDependencyMojo
outputAbsoluteArtifactFilename, reactorProjects, session
-
-
Constructor Summary
Constructors Constructor Description CopyMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcopyArtifact(ArtifactItem artifactItem)Resolves the artifact from the repository and copies it to the specified location.protected voiddoExecute()Main entry into mojo.protected ArtifactItemFiltergetMarkedArtifactFilter(ArtifactItem item)booleanisStripClassifier()booleanisStripVersion()voidsetStripClassifier(boolean stripClassifier)voidsetStripVersion(boolean stripVersion)voidsetUseBaseVersion(boolean useBaseVersion)-
Methods inherited from class org.apache.maven.plugins.dependency.fromConfiguration.AbstractFromConfigurationMojo
getArtifact, getArtifactItems, getOutputDirectory, getProcessedArtifactItems, isOverWriteIfNewer, isOverWriteReleases, isOverWriteSnapshots, setArtifact, setArtifactItems, setLocalRepositoryDirectory, setOutputDirectory, setOverWriteIfNewer, setOverWriteReleases, setOverWriteSnapshots, verifyRequirements
-
Methods inherited from class org.apache.maven.plugins.dependency.AbstractDependencyMojo
copyFile, execute, getArchiverManager, getProject, isSilent, isSkip, isUseJvmChmod, newResolveArtifactProjectBuildingRequest, setArchiverManager, setSilent, setSkip, setUseJvmChmod, unpack, unpack, unpack
-
-
-
-
Method Detail
-
doExecute
protected void doExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionMain entry into mojo. This method gets the ArtifactItems and iterates through each one passing it to copyArtifact.- Specified by:
doExecutein classAbstractDependencyMojo- Throws:
org.apache.maven.plugin.MojoExecutionException- with a message if an error occurs.org.apache.maven.plugin.MojoFailureException-MojoFailureException- See Also:
ArtifactItem,AbstractFromConfigurationMojo.getArtifactItems(),copyArtifact(ArtifactItem)
-
copyArtifact
protected void copyArtifact(ArtifactItem artifactItem) throws org.apache.maven.plugin.MojoExecutionException
Resolves the artifact from the repository and copies it to the specified location.- Parameters:
artifactItem- containing the information about the Artifact to copy.- Throws:
org.apache.maven.plugin.MojoExecutionException- with a message if an error occurs.- See Also:
AbstractDependencyMojo.copyFile(File, File)
-
getMarkedArtifactFilter
protected ArtifactItemFilter getMarkedArtifactFilter(ArtifactItem item)
-
isStripVersion
public boolean isStripVersion()
- Returns:
- Returns the stripVersion.
-
setStripVersion
public void setStripVersion(boolean stripVersion)
- Parameters:
stripVersion- The stripVersion to set.
-
isStripClassifier
public boolean isStripClassifier()
- Returns:
- Returns the stripClassifier.
-
setStripClassifier
public void setStripClassifier(boolean stripClassifier)
- Parameters:
stripClassifier- The stripClassifier to set.
-
setUseBaseVersion
public void setUseBaseVersion(boolean useBaseVersion)
- Parameters:
useBaseVersion- The useBaseVersion to set.
-
-