org.apache.myfaces.buildtools.maven2.plugin.builder.unpack
Class AbstractFromConfigurationMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.myfaces.buildtools.maven2.plugin.builder.unpack.AbstractDependencyMojo
          extended by org.apache.myfaces.buildtools.maven2.plugin.builder.unpack.AbstractFromConfigurationMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
UnpackMojo

public abstract class AbstractFromConfigurationMojo
extends AbstractDependencyMojo

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

Version:
$Id: AbstractFromConfigurationMojo.java 674207 2008-07-05 16:03:21Z skitching $
Author:
Brian Fox
See Also:
ArtifactItem

Field Summary
 
Fields inherited from class org.apache.myfaces.buildtools.maven2.plugin.builder.unpack.AbstractDependencyMojo
archiverManager, artifactCollector, artifactMetadataSource, factory, local, outputAbsoluteArtifactFilename, project, reactorProjects, remoteRepos, resolver, silent
 
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.
 ArrayList getArtifactItems()
           
 File getOutputDirectory()
           
protected  ArrayList getProcessedArtifactItems(boolean removeVersion)
          Preprocesses the list of ArtifactItems.
 boolean isOverWriteIfNewer()
           
 boolean isOverWriteReleases()
           
 boolean isOverWriteSnapshots()
           
 void setArtifactItems(ArrayList theArtifactItems)
           
 void setOutputDirectory(File theOutputDirectory)
           
 void setOverWriteIfNewer(boolean theOverWriteIfNewer)
           
 void setOverWriteReleases(boolean theOverWriteReleases)
           
 void setOverWriteSnapshots(boolean theOverWriteSnapshots)
           
 
Methods inherited from class org.apache.myfaces.buildtools.maven2.plugin.builder.unpack.AbstractDependencyMojo
copyFile, getArchiverManager, getArtifactCollector, getArtifactMetadataSource, getFactory, getLocal, 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
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Constructor Detail

AbstractFromConfigurationMojo

public AbstractFromConfigurationMojo()
Method Detail

getProcessedArtifactItems

protected ArrayList getProcessedArtifactItems(boolean removeVersion)
                                       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.

Parameters:
removeVersion - remove the version from the filename.
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 dependency list or 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.

getArtifactItems

public ArrayList getArtifactItems()
Returns:
Returns the artifactItems.

setArtifactItems

public void setArtifactItems(ArrayList theArtifactItems)
Parameters:
theArtifactItems - The artifactItems to set.

getOutputDirectory

public File getOutputDirectory()
Returns:
Returns the outputDirectory.

setOutputDirectory

public void setOutputDirectory(File theOutputDirectory)
Parameters:
theOutputDirectory - The outputDirectory to set.

isOverWriteIfNewer

public boolean isOverWriteIfNewer()
Returns:
Returns the overWriteIfNewer.

setOverWriteIfNewer

public void setOverWriteIfNewer(boolean theOverWriteIfNewer)
Parameters:
theOverWriteIfNewer - The overWriteIfNewer to set.

isOverWriteReleases

public boolean isOverWriteReleases()
Returns:
Returns the overWriteReleases.

setOverWriteReleases

public void setOverWriteReleases(boolean theOverWriteReleases)
Parameters:
theOverWriteReleases - The overWriteReleases to set.

isOverWriteSnapshots

public boolean isOverWriteSnapshots()
Returns:
Returns the overWriteSnapshots.

setOverWriteSnapshots

public void setOverWriteSnapshots(boolean theOverWriteSnapshots)
Parameters:
theOverWriteSnapshots - The overWriteSnapshots to set.


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.