|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.plugin.AbstractMojo org.apache.geronimo.genesis.MojoSupport
public abstract class MojoSupport
Support for Mojo implementations.
Field Summary | |
---|---|
protected org.codehaus.plexus.PlexusContainer |
container
|
protected org.apache.maven.plugin.logging.Log |
log
Instance logger. |
Fields inherited from interface org.apache.maven.plugin.Mojo |
---|
ROLE |
Constructor Summary | |
---|---|
protected |
MojoSupport()
|
Method Summary | |
---|---|
void |
contextualize(org.codehaus.plexus.context.Context context)
|
protected org.apache.maven.artifact.Artifact |
createArtifact(ArtifactItem item)
Create a new artifact. |
protected void |
doExecute()
Sub-class should override to provide custom execution logic. |
void |
execute()
Main Mojo execution hook. |
protected org.apache.maven.artifact.Artifact |
getArtifact(ArtifactItem item)
Resolves the Artifact from the remote repository if nessessary. |
protected org.apache.maven.artifact.factory.ArtifactFactory |
getArtifactFactory()
Get the artifact factory. |
protected org.apache.maven.artifact.repository.ArtifactRepository |
getArtifactRepository()
Get the artifact repository. |
protected org.apache.maven.artifact.resolver.ArtifactResolver |
getArtifactResolver()
Get the artifact resolver. |
protected org.apache.maven.project.MavenProject |
getProject()
Get the Maven project. |
protected Set |
getProjectArtifacts()
|
protected Set |
getProjectArtifacts(boolean resolve)
|
protected Set |
getProjectArtifacts(org.apache.maven.project.MavenProject project,
boolean resolve)
|
protected void |
init()
Initializes logging. |
protected org.apache.maven.artifact.Artifact |
resolveArtifact(org.apache.maven.artifact.Artifact artifact)
Resolves the Artifact from the remote repository non-transitivly. |
protected org.apache.maven.artifact.Artifact |
resolveArtifact(org.apache.maven.artifact.Artifact artifact,
boolean transitive)
Resolves the Artifact from the remote repository if nessessary. |
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 |
Field Detail |
---|
protected org.codehaus.plexus.PlexusContainer container
protected org.apache.maven.plugin.logging.Log log
AbstractMojo.getLog()
on execution.
Constructor Detail |
---|
protected MojoSupport()
Method Detail |
---|
protected void init() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
execute()
.
org.apache.maven.plugin.MojoExecutionException
- Initialization failed
org.apache.maven.plugin.MojoFailureException
- Initialization failedpublic void contextualize(org.codehaus.plexus.context.Context context) throws org.codehaus.plexus.context.ContextException
contextualize
in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
org.codehaus.plexus.context.ContextException
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
doExecute()
instead.
execute
in interface org.apache.maven.plugin.Mojo
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected void doExecute() throws Exception
Exception
- Execution failedprotected org.apache.maven.project.MavenProject getProject()
Sub-class must overridde to provide access.
protected org.apache.maven.artifact.repository.ArtifactRepository getArtifactRepository()
Sub-class must overridde to provide access.
protected final org.apache.maven.artifact.factory.ArtifactFactory getArtifactFactory()
protected final org.apache.maven.artifact.resolver.ArtifactResolver getArtifactResolver()
protected org.apache.maven.artifact.Artifact createArtifact(ArtifactItem item) throws org.apache.maven.plugin.MojoExecutionException
item
- The item to create an artifact for
org.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 null
org.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 transitivly
org.apache.maven.plugin.MojoExecutionException
- Failed to resolve artifactprotected org.apache.maven.artifact.Artifact resolveArtifact(org.apache.maven.artifact.Artifact artifact) throws org.apache.maven.plugin.MojoExecutionException
artifact
- The artifact to be resolved; must not be null
org.apache.maven.plugin.MojoExecutionException
- Failed to resolve artifactresolveArtifact(Artifact,boolean)
protected Set getProjectArtifacts(org.apache.maven.project.MavenProject project, boolean resolve) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected Set getProjectArtifacts(boolean resolve) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected Set getProjectArtifacts() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |