org.codehaus.mojo.dependency
Class CopyDependenciesMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.dependency.AbstractFromDependenciesMojo
          extended by org.codehaus.mojo.dependency.CopyDependenciesMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class CopyDependenciesMojo
extends AbstractFromDependenciesMojo

Goal that copies the project dependencies from the repository to a defined location.

Author:
brianf

Field Summary
 
Fields inherited from class org.codehaus.mojo.dependency.AbstractFromDependenciesMojo
archiverManager, outputDirectory
 
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)
          Copies the Artifact after building the destination file name if overridden.
 void execute()
          Main entry into mojo.
 
Methods inherited from class org.codehaus.mojo.dependency.AbstractFromDependenciesMojo
getDependencies, getMappedReactorArtifacts
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyDependenciesMojo

public CopyDependenciesMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Main entry into mojo. Gets the list of dependencies and iterates through calling copyArtifact.

Throws:
org.apache.maven.plugin.MojoExecutionException - with a message if an error occurs.
See Also:
AbstractFromDependenciesMojo.getDependencies(), copyArtifact(Artifact, boolean)

copyArtifact

protected void copyArtifact(org.apache.maven.artifact.Artifact artifact,
                            boolean removeVersion)
                     throws org.apache.maven.plugin.MojoExecutionException
Copies the Artifact after building the destination file name if overridden. This method also checks if the classifier is set and adds it to the destination file name if needed.

Parameters:
artifact - representing the object to be copied.
removeVersion - specifies if the version should be removed from the file name when copying.
Throws:
org.apache.maven.plugin.MojoExecutionException - with a message if an error occurs.
See Also:
DependencyUtil.copyFile(File, File, Log), DependencyUtil.getFormattedFileName(Artifact, boolean)


Copyright © {inceptionYear}-2008 null. All Rights Reserved.