org.codehaus.mojo.dependency

Class AbstractFromConfigurationMojo

public abstract class AbstractFromConfigurationMojo extends 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 ArchiverManagerarchiverManager
To look up Archiver/UnArchiver implementations
protected MavenProjectproject
POM
Method Summary
protected ArtifactgetArtifact(ArtifactItem artifactItem)
Resolves the Artifact from the remote repository if nessessary.
protected ArrayListgetArtifactItems()
Preprocesses the list of ArtifactItems.

Field Detail

archiverManager

protected ArchiverManager archiverManager
To look up Archiver/UnArchiver implementations

UNKNOWN: expression="${component.org.codehaus.plexus.archiver.manager.ArchiverManager}"

project

protected MavenProject project
POM

UNKNOWN: expression="${project}"

Method Detail

getArtifact

protected Artifact getArtifact(ArtifactItem artifactItem)
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: MojoExecutionException with a message if the version can't be found in DependencyManagement.

getArtifactItems

protected ArrayList getArtifactItems()
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: MojoExecutionException with a message if an error occurs.

See Also: ArtifactItem

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