org.apache.maven.plugin.dependency.fromConfiguration
Class AbstractFromConfigurationMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugin.dependency.AbstractDependencyMojo
org.apache.maven.plugin.dependency.fromConfiguration.AbstractFromConfigurationMojo
- All Implemented Interfaces:
- ContextEnabled, Mojo
- Direct Known Subclasses:
- CopyMojo, 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.html 861760 2013-05-12 17:31:26Z hboutemy $
- Author:
- Brian Fox
- See Also:
ArtifactItem
Fields inherited from class org.apache.maven.plugin.dependency.AbstractDependencyMojo |
archiverManager, artifactCollector, artifactMetadataSource, factory, ignorePermissions, outputAbsoluteArtifactFilename, project, reactorProjects, remoteRepos, resolver, silent, useJvmChmod |
Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
Methods inherited from class org.apache.maven.plugin.dependency.AbstractDependencyMojo |
copyFile, doExecute, 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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractFromConfigurationMojo
public AbstractFromConfigurationMojo()
verifyRequirements
protected void verifyRequirements()
throws MojoFailureException
- Throws:
MojoFailureException
getProcessedArtifactItems
protected List<ArtifactItem> getProcessedArtifactItems(ProcessArtifactItemsRequest processArtifactItemsRequest)
throws 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.prependGroupId
- prepend the groupId to the filename.useBaseVersion
- use the baseVersion of the artifact instead of version for the filename.
- Returns:
- An ArrayList of preprocessed ArtifactItems
- Throws:
MojoExecutionException
- with a message if an error occurs.- See Also:
ArtifactItem
getArtifact
protected Artifact getArtifact(ArtifactItem artifactItem)
throws MojoExecutionException
- Resolves the Artifact from the remote repository if necessary. 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:
MojoExecutionException
- with a message if the version can't be found in DependencyManagement.
getLocal
protected ArtifactRepository getLocal()
- Override the base to
- Overrides:
getLocal
in class AbstractDependencyMojo
- Returns:
- Returns the local.
getArtifactItems
public List<ArtifactItem> getArtifactItems()
- Returns:
- Returns the artifactItems.
setArtifactItems
public void setArtifactItems(List<ArtifactItem> 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.
setLocalRepositoryDirectory
public void setLocalRepositoryDirectory(File localRepositoryDirectory)
setArtifact
public void setArtifact(String artifact)
throws MojoFailureException
- Throws:
MojoFailureException
Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.