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 AbstractFromConfigurationMojo
Goal that copies a list of artifacts from the repository to defined locations.
- Since:
- 1.0
- Author:
- Brian Fox
- 
Field SummaryFields inherited from class org.apache.maven.plugins.dependency.AbstractDependencyMojoreactorProjects, sessionFields inherited from interface org.apache.maven.plugin.MojoROLE
- 
Constructor SummaryConstructorsConstructorDescriptionCopyMojo(org.apache.maven.execution.MavenSession session, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.project.MavenProject project, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, CopyUtil copyUtil, org.eclipse.aether.RepositorySystem repositorySystem) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidcopyArtifact(ArtifactItem artifactItem) Resolves the artifact from the repository and copies it to the specified location.protected voidMain entry into mojo.protected ArtifactItemFilterbooleanbooleanvoidsetStripClassifier(boolean stripClassifier) voidsetStripVersion(boolean stripVersion) voidsetUseBaseVersion(boolean useBaseVersion) Methods inherited from class org.apache.maven.plugins.dependency.fromConfiguration.AbstractFromConfigurationMojogetArtifact, getArtifactItems, getOutputDirectory, getProcessedArtifactItems, isOverWriteIfNewer, isOverWriteReleases, isOverWriteSnapshots, setArtifact, setArtifactItems, setLocalRepositoryDirectory, setOutputDirectory, setOverWriteIfNewer, setOverWriteReleases, setOverWriteSnapshots, verifyRequirementsMethods inherited from class org.apache.maven.plugins.dependency.AbstractDependencyMojoexecute, getProject, isSilent, isSkip, setSilent, setSkipMethods inherited from class org.apache.maven.plugin.AbstractMojogetLog, getPluginContext, setLog, setPluginContext
- 
Constructor Details- 
CopyMojo@Inject public CopyMojo(org.apache.maven.execution.MavenSession session, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.project.MavenProject project, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, CopyUtil copyUtil, org.eclipse.aether.RepositorySystem repositorySystem) 
 
- 
- 
Method Details- 
doExecuteprotected 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 class- AbstractDependencyMojo
- Throws:
- org.apache.maven.plugin.MojoExecutionException- with a message if an error occurs
- org.apache.maven.plugin.MojoFailureException-- MojoFailureException
- See Also:
 
- 
copyArtifactprotected 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:
 
- 
getMarkedArtifactFilter
- 
isStripVersionpublic boolean isStripVersion()- Returns:
- returns the stripVersion
 
- 
setStripVersionpublic void setStripVersion(boolean stripVersion) - Parameters:
- stripVersion- the stripVersion to set
 
- 
isStripClassifierpublic boolean isStripClassifier()- Returns:
- returns the stripClassifier
 
- 
setStripClassifierpublic void setStripClassifier(boolean stripClassifier) - Parameters:
- stripClassifier- the stripClassifier to set
 
- 
setUseBaseVersionpublic void setUseBaseVersion(boolean useBaseVersion) - Parameters:
- useBaseVersion- the useBaseVersion to set
 
 
-