public abstract class MojoSupport
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field and Description |
---|---|
protected org.apache.maven.artifact.factory.ArtifactFactory |
artifactFactory |
protected org.apache.maven.artifact.metadata.ArtifactMetadataSource |
artifactMetadataSource |
protected org.apache.maven.artifact.repository.ArtifactRepository |
artifactRepository |
protected org.apache.maven.artifact.resolver.ArtifactResolver |
artifactResolver |
protected org.slf4j.Logger |
log |
protected org.apache.maven.project.MavenProject |
project |
protected List |
remoteRepositories |
Constructor and Description |
---|
MojoSupport() |
Modifier and Type | Method and Description |
---|---|
protected org.apache.maven.artifact.Artifact |
createArtifact(ArtifactItem item)
Create a new artifact.
|
protected URL[] |
createClassPath() |
protected abstract void |
doExecute() |
void |
execute()
Main Mojo execution hook.
|
protected org.apache.maven.artifact.Artifact |
getArtifact(ArtifactItem item)
Resolves the Artifact from the remote repository if necessary.
|
protected List |
getProjectClasspathElements() |
protected ArtifactItem[] |
getUserClassspathElements() |
protected org.apache.maven.artifact.Artifact |
resolveArtifact(org.apache.maven.artifact.Artifact artifact,
boolean transitive)
Resolves the Artifact from the remote repository if necessary.
|
protected final org.slf4j.Logger log
protected org.apache.maven.project.MavenProject project
protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
protected org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
protected org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource
protected org.apache.maven.artifact.repository.ArtifactRepository artifactRepository
protected List remoteRepositories
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
doExecute()
instead.org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected List getProjectClasspathElements() throws org.apache.maven.artifact.DependencyResolutionRequiredException
org.apache.maven.artifact.DependencyResolutionRequiredException
protected ArtifactItem[] getUserClassspathElements()
protected org.apache.maven.artifact.Artifact createArtifact(ArtifactItem item) throws org.apache.maven.plugin.MojoExecutionException
item
- The item to create an artifact fororg.apache.maven.plugin.MojoExecutionException
- Failed to create artifactprotected org.apache.maven.artifact.Artifact getArtifact(ArtifactItem item) throws org.apache.maven.plugin.MojoExecutionException
item
- The item to create an artifact for; must not be nullorg.apache.maven.plugin.MojoExecutionException
- Failed to create artifactprotected org.apache.maven.artifact.Artifact resolveArtifact(org.apache.maven.artifact.Artifact artifact, boolean transitive) throws org.apache.maven.plugin.MojoExecutionException
artifact
- The artifact to be resolved; must not be nulltransitive
- True to resolve the artifact transitivelyorg.apache.maven.plugin.MojoExecutionException
- Failed to resolve artifactCopyright © 2006-2012 Codehaus. All Rights Reserved.