org.codehaus.mojo.dependency
Class AbstractFromConfigurationMojo

java.lang.Object
  extended byorg.apache.maven.plugin.AbstractMojo
      extended byorg.codehaus.mojo.dependency.AbstractFromConfigurationMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
CopyMojo, UnpackMojo

public abstract class AbstractFromConfigurationMojo
extends org.apache.maven.plugin.AbstractMojo

Abstract Parent class used by mojos that get Artifact information from the plugin configuration as an ArrayList of ArtifactItems

Author:
brianf
See Also:
ArtifactItem

Field Summary
protected  org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
          To look up Archiver/UnArchiver implementations
protected  org.apache.maven.project.MavenProject project
          POM
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractFromConfigurationMojo()
           
 
Method Summary
protected  org.apache.maven.artifact.Artifact getArtifact(ArtifactItem artifactItem)
          Resolves the Artifact from the remote repository if nessessary.
protected  java.util.ArrayList getArtifactItems()
          Preprocesses the list of ArtifactItems.
 
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
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Field Detail

archiverManager

protected org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
To look up Archiver/UnArchiver implementations


project

protected org.apache.maven.project.MavenProject project
POM

Constructor Detail

AbstractFromConfigurationMojo

public AbstractFromConfigurationMojo()
Method Detail

getArtifactItems

protected java.util.ArrayList getArtifactItems()
                                        throws org.apache.maven.plugin.MojoExecutionException
Preprocesses the list of ArtifactItems. This method defaults the outputDirectory if not set and creates the output Directory if it doesn't exist.

Returns:
An ArrayList of preprocessed ArtifactItems
Throws:
org.apache.maven.plugin.MojoExecutionException - with a message if an error occurs.
See Also:
ArtifactItem

getArtifact

protected org.apache.maven.artifact.Artifact getArtifact(ArtifactItem artifactItem)
                                                  throws org.apache.maven.plugin.MojoExecutionException
Resolves the Artifact from the remote repository if nessessary. If no version is specified, it will be retrieved from the DependencyManagement section of the pom.

Parameters:
artifactItem - containing information about artifact from plugin configuration.
Returns:
Artifact object representing the specified file.
Throws:
org.apache.maven.plugin.MojoExecutionException - with a message if the version can't be found in DependencyManagement.


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