org.codehaus.mojo.jpox
Class AbstractJpoxMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.jpox.AbstractJpoxMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AbstractJpoxSchemaMojo, JpoxEnhancerMojo

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

Convenience base class for Jpox Mojo extensions.

Version:
$Id: AbstractJpoxMojo.java 3278 2007-02-08 11:51:10Z kenney $
Author:
Rahul Thakur

Field Summary
protected  File classes
           
protected  List pluginArtifacts
           
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractJpoxMojo()
           
 
Method Summary
 void execute()
           
protected abstract  void executeJpoxTool(List pluginArtifacts, URL log4jProperties, List files)
          Template method expected to be implemented by extensions.
protected  List findMappingFiles()
          Locates and builds a list of all JDO mapping (.jdo) files under the build output directory.
protected abstract  String getToolName()
          Returns the Jpox tool name being invoked by this plugin's execution.
protected  List getUniqueClasspathElements()
           Return the set of classpath elements, ensuring that classes location is first, and that no entry is duplicated in the classpath.
 
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

classes

protected File classes

pluginArtifacts

protected List pluginArtifacts
Constructor Detail

AbstractJpoxMojo

public AbstractJpoxMojo()
Method Detail

execute

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

findMappingFiles

protected List findMappingFiles()
                         throws org.apache.maven.plugin.MojoExecutionException
Locates and builds a list of all JDO mapping (.jdo) files under the build output directory.

Throws:
org.apache.maven.plugin.MojoExecutionException

getUniqueClasspathElements

protected List getUniqueClasspathElements()

Return the set of classpath elements, ensuring that classes location is first, and that no entry is duplicated in the classpath.

The ability of the user to specify an alternate classes location facilitates the need for this.
Example: Users that want to JpoxEnhance their test classes.

Returns:
the list of unique classpath elements.

executeJpoxTool

protected abstract void executeJpoxTool(List pluginArtifacts,
                                        URL log4jProperties,
                                        List files)
                                 throws org.codehaus.plexus.util.cli.CommandLineException,
                                        org.apache.maven.plugin.MojoExecutionException
Template method expected to be implemented by extensions. This acts as hook to invoke custom Jpox tool.

Parameters:
pluginArtifacts -
log4jProperties -
files -
Throws:
org.codehaus.plexus.util.cli.CommandLineException
org.apache.maven.plugin.MojoExecutionException

getToolName

protected abstract String getToolName()
Returns the Jpox tool name being invoked by this plugin's execution.

Returns:
Jpox tool/utility name being invoked.


Copyright © 2012 Codehaus. All Rights Reserved.