org.ow2.easybeans.mavenplugin
Class AbstractEasyBeansMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.ow2.easybeans.mavenplugin.AbstractEasyBeansMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable, org.ow2.util.maven.plugin.deployment.api.IDeploymentMojo, org.ow2.util.maven.plugin.deployment.api.IMojo
Direct Known Subclasses:
AbstractEasyBeansBoundMojo, AbstractEasyBeansUnboundMojo

public abstract class AbstractEasyBeansMojo
extends org.apache.maven.plugin.AbstractMojo
implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable, org.ow2.util.maven.plugin.deployment.api.IDeploymentMojo

Abstract base class managing additional deployed archives specified in the POM.

Author:
Vincent Michaud

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractEasyBeansMojo()
           
 
Method Summary
 void contextualize(org.codehaus.plexus.context.Context context)
          Called before the execution of the mojo.
protected abstract  org.ow2.util.maven.plugin.deployment.api.IDeploymentCore defineMojoCore()
          Define the core of the mojo.
 void execute()
          Execute the mojo.
 org.ow2.util.maven.plugin.deployment.mapping.Deployables getAdditionalDeployables()
          Access to the additional deployables of the project.
 org.apache.maven.artifact.factory.ArtifactFactory getArtifactFactory()
          Get the component used to create artifact instances.
 org.apache.maven.artifact.resolver.ArtifactResolver getArtifactResolver()
          Get the component used to resolve additional artifacts required.
protected  org.ow2.util.maven.plugin.deployment.api.IDeploymentCore getCore()
          Get the core of the mojo.
 org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
          Get the local repository.
 org.apache.maven.artifact.metadata.ArtifactMetadataSource getMetadataSource()
          Get the component used to get metadata.
 org.codehaus.plexus.context.Context getPlexusPluginContext()
          Get the plexus context of the plugin.
 String getPluginArtifactId()
          Get the artifact ID of the plugin.
 String getPluginGroupId()
          Get the group ID of the plugin.
 String getPluginVersion()
          Get the version of the plugin.
 org.apache.maven.project.MavenProject getProject()
          Access to the Maven project.
 org.apache.maven.project.MavenProjectBuilder getProjectBuilder()
          Get the component used to build Maven project.
 List<org.apache.maven.project.MavenProject> getReactorProjects()
          Access to reactor projects.
 
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
 
Methods inherited from interface org.ow2.util.maven.plugin.deployment.api.IDeploymentMojo
defineConfiguration, defineDeploymentBehavior, getLaunchedServer
 
Methods inherited from interface org.ow2.util.maven.plugin.deployment.api.IMojo
getLog
 

Constructor Detail

AbstractEasyBeansMojo

public AbstractEasyBeansMojo()
Method Detail

getProject

public org.apache.maven.project.MavenProject getProject()
Access to the Maven project.

Specified by:
getProject in interface org.ow2.util.maven.plugin.deployment.api.IMojo
Returns:
The current Maven project

getReactorProjects

public List<org.apache.maven.project.MavenProject> getReactorProjects()
Access to reactor projects.

Specified by:
getReactorProjects in interface org.ow2.util.maven.plugin.deployment.api.IMojo
Returns:
Current reactor projects

getAdditionalDeployables

public org.ow2.util.maven.plugin.deployment.mapping.Deployables getAdditionalDeployables()
Access to the additional deployables of the project.

Specified by:
getAdditionalDeployables in interface org.ow2.util.maven.plugin.deployment.api.IDeploymentMojo
Returns:
Additional deployables

getLocalRepository

public org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
Get the local repository.

Specified by:
getLocalRepository in interface org.ow2.util.maven.plugin.deployment.api.IMojo
Returns:
The local repository

getPluginArtifactId

public String getPluginArtifactId()
Get the artifact ID of the plugin.

Specified by:
getPluginArtifactId in interface org.ow2.util.maven.plugin.deployment.api.IMojo
Returns:
The artifact ID

getPluginGroupId

public String getPluginGroupId()
Get the group ID of the plugin.

Specified by:
getPluginGroupId in interface org.ow2.util.maven.plugin.deployment.api.IMojo
Returns:
The group ID

getPluginVersion

public String getPluginVersion()
Get the version of the plugin.

Specified by:
getPluginVersion in interface org.ow2.util.maven.plugin.deployment.api.IMojo
Returns:
The version

getArtifactResolver

public org.apache.maven.artifact.resolver.ArtifactResolver getArtifactResolver()
Get the component used to resolve additional artifacts required.

Specified by:
getArtifactResolver in interface org.ow2.util.maven.plugin.deployment.api.IMojo
Returns:
The artifact resolver

getArtifactFactory

public org.apache.maven.artifact.factory.ArtifactFactory getArtifactFactory()
Get the component used to create artifact instances.

Specified by:
getArtifactFactory in interface org.ow2.util.maven.plugin.deployment.api.IMojo
Returns:
The artifact factory

getMetadataSource

public org.apache.maven.artifact.metadata.ArtifactMetadataSource getMetadataSource()
Get the component used to get metadata.

Specified by:
getMetadataSource in interface org.ow2.util.maven.plugin.deployment.api.IMojo
Returns:
The metadata source

getProjectBuilder

public org.apache.maven.project.MavenProjectBuilder getProjectBuilder()
Get the component used to build Maven project.

Specified by:
getProjectBuilder in interface org.ow2.util.maven.plugin.deployment.api.IMojo
Returns:
The project builder

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Execute the mojo.

Specified by:
execute in interface org.apache.maven.plugin.Mojo
Throws:
org.apache.maven.plugin.MojoExecutionException - Execution error

contextualize

public void contextualize(org.codehaus.plexus.context.Context context)
Called before the execution of the mojo. Initialize the plugin classloader.

Specified by:
contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Parameters:
context - The Plexus context

getPlexusPluginContext

public org.codehaus.plexus.context.Context getPlexusPluginContext()
Get the plexus context of the plugin.

Specified by:
getPlexusPluginContext in interface org.ow2.util.maven.plugin.deployment.api.IMojo
Returns:
The context

getCore

protected org.ow2.util.maven.plugin.deployment.api.IDeploymentCore getCore()
Get the core of the mojo.

Returns:
The core, or null if the core is not initialized

defineMojoCore

protected abstract org.ow2.util.maven.plugin.deployment.api.IDeploymentCore defineMojoCore()
                                                                                    throws org.apache.maven.plugin.MojoExecutionException
Define the core of the mojo.

Returns:
The core of the mojo
Throws:
org.apache.maven.plugin.MojoExecutionException - Execution error


Copyright © 2006-2011 OW2 Consortium. All Rights Reserved.