org.apache.maven.plugin.dependency.fromConfiguration
Class CopyMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugin.dependency.AbstractDependencyMojo
          extended by org.apache.maven.plugin.dependency.fromConfiguration.AbstractFromConfigurationMojo
              extended by org.apache.maven.plugin.dependency.fromConfiguration.CopyMojo
All Implemented Interfaces:
ContextEnabled, 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
Version:
$Id: CopyMojo.html 862013 2013-05-14 22:24:45Z hboutemy $
Author:
Brian Fox

Field Summary
protected  boolean ignorePermissions
          not used in this goal
protected  boolean useJvmChmod
          not used in this goal
 
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
CopyMojo()
           
 
Method Summary
protected  void copyArtifact(ArtifactItem artifactItem)
          Resolves the artifact from the repository and copies it to the specified location.
protected  void doExecute()
          Main entry into mojo.
protected  ArtifactItemFilter getMarkedArtifactFilter(ArtifactItem item)
           
 boolean isStripClassifier()
           
 boolean isStripVersion()
           
 void setStripClassifier(boolean stripClassifier)
           
 void setStripVersion(boolean stripVersion)
           
 void setUseBaseVersion(boolean useBaseVersion)
           
 
Methods inherited from class org.apache.maven.plugin.dependency.fromConfiguration.AbstractFromConfigurationMojo
getArtifact, getArtifactItems, getLocal, getOutputDirectory, getProcessedArtifactItems, isOverWriteIfNewer, isOverWriteReleases, isOverWriteSnapshots, setArtifact, setArtifactItems, setLocalRepositoryDirectory, setOutputDirectory, setOverWriteIfNewer, setOverWriteReleases, setOverWriteSnapshots, verifyRequirements
 
Methods inherited from class org.apache.maven.plugin.dependency.AbstractDependencyMojo
copyFile, execute, getArchiverManager, getArtifactCollector, getArtifactMetadataSource, getFactory, 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

useJvmChmod

@Parameter
protected boolean useJvmChmod
not used in this goal


ignorePermissions

@Parameter
protected boolean ignorePermissions
not used in this goal

Constructor Detail

CopyMojo

public CopyMojo()
Method Detail

doExecute

protected void doExecute()
                  throws MojoExecutionException,
                         MojoFailureException
Main entry into mojo. This method gets the ArtifactItems and iterates through each one passing it to copyArtifact.

Specified by:
doExecute in class AbstractDependencyMojo
Throws:
MojoExecutionException - with a message if an error occurs.
MojoFailureException
See Also:
ArtifactItem, AbstractFromConfigurationMojo.getArtifactItems(), copyArtifact(ArtifactItem)

copyArtifact

protected void copyArtifact(ArtifactItem artifactItem)
                     throws 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:
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.

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.


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.