org.apache.maven.plugin.dependency.fromConfiguration
Class CopyMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugin.dependency.AbstractDependencyMojo
org.apache.maven.plugin.dependency.fromConfiguration.AbstractFromConfigurationMojo
org.apache.maven.plugin.dependency.fromConfiguration.CopyMojo
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
public class CopyMojo
- extends AbstractFromConfigurationMojo
Goal that copies a list of artifacts from the repository to defined locations.
- Since:
- 1.0
- Version:
- $Id: CopyMojo.java 1085777 2011-03-26 18:13:19Z hboutemy $
- Author:
- Brian Fox
- Is defined by the goal name:
- copy
- Is bound to the specified phase of the standard build lifecycle:
- process-sources
Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
Methods inherited from class org.apache.maven.plugin.dependency.fromConfiguration.AbstractFromConfigurationMojo |
getArtifact, getArtifactItems, getLocal, getOutputDirectory, getProcessedArtifactItems, isOverWriteIfNewer, isOverWriteReleases, isOverWriteSnapshots, isSkip, setArtifactItems, setLocalRepositoryDirectory, setOutputDirectory, setOverWriteIfNewer, setOverWriteReleases, setOverWriteSnapshots, setSkip |
Methods inherited from class org.apache.maven.plugin.dependency.AbstractDependencyMojo |
copyFile, getArchiverManager, getArtifactCollector, getArtifactMetadataSource, getFactory, getLog, getProject, getRemoteRepos, getResolver, setArchiverManager, setArtifactCollector, setArtifactMetadataSource, setFactory, setLocal, setRemoteRepos, setResolver, 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 |
CopyMojo
public CopyMojo()
execute
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
- Main entry into mojo. This method gets the ArtifactItems and iterates through each one passing it to
copyArtifact.
- Throws:
org.apache.maven.plugin.MojoExecutionException
- with a message if an error occurs.- 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:
DependencyUtil#copyFile(File, File, Log)
,
DependencyUtil#getFormattedFileName(Artifact, boolean)
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.
Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.