org.jboss.maven.plugins.injection
Class AbstractInjectionMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.jboss.maven.plugins.injection.AbstractInjectionMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
BytecodeInjectionMojo

public abstract class AbstractInjectionMojo
extends org.apache.maven.plugin.AbstractMojo

Mojo responsible for injecting values into various targets as part of a build process. One example of this is injecting the project version into a class file (bytcode manip) or a text file or etc so that these various targets do not need to be synch'ed manually.

Author:
Steve Ebersole

Field Summary
protected  org.apache.maven.project.MavenProject project
          The Maven Project Object
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractInjectionMojo()
           
 
Method Summary
protected  ClassLoader buildProjectCompileClassLoader()
           
 void execute()
           
protected  void finishUp()
           
protected abstract  List<InjectionDescriptor> getInjectionDescriptors()
           
protected  void prepare()
           
protected  List<String> projectCompileClasspathElements()
           
protected  String resolveExpression(String expression)
           
 
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

project

protected org.apache.maven.project.MavenProject project
The Maven Project Object

Constructor Detail

AbstractInjectionMojo

public AbstractInjectionMojo()
Method Detail

prepare

protected void prepare()
                throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

getInjectionDescriptors

protected abstract List<InjectionDescriptor> getInjectionDescriptors()
                                                              throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

finishUp

protected void finishUp()

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

resolveExpression

protected final String resolveExpression(String expression)

buildProjectCompileClassLoader

protected final ClassLoader buildProjectCompileClassLoader()
                                                    throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

projectCompileClasspathElements

protected final List<String> projectCompileClasspathElements()
                                                      throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException


Copyright © 2011 JBoss, a division of Red Hat, Inc. All Rights Reserved.