org.joda.beans.maven
Class AbstractJodaBeansMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.joda.beans.maven.AbstractJodaBeansMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
JodaBeansGenerateMojo, JodaBeansValidateMojo

public class AbstractJodaBeansMojo
extends org.apache.maven.plugin.AbstractMojo

Abstract Joda-Beans Mojo.


Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractJodaBeansMojo()
           
 
Method Summary
protected  List<String> buildArgs()
          Builds the arguments to the tool.
 void execute()
          Executes the Joda-Beans generator.
protected  String getSourceDir()
          Gets the source directory.
protected  URLClassLoader obtainClassLoader()
          Obtains the classloader from a set of file paths.
protected  List<String> obtainClasspath()
          Obtains the resolved classpath of dependencies.
protected  int runTool(Class<?> toolClass, List<String> argsList)
          Runs the tool.
 
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
 

Constructor Detail

AbstractJodaBeansMojo

public AbstractJodaBeansMojo()
Method Detail

getSourceDir

protected String getSourceDir()
Gets the source directory.

Returns:
the source directory, not null

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Executes the Joda-Beans generator.

Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

buildArgs

protected List<String> buildArgs()
Builds the arguments to the tool.

Returns:
the arguments, not null

runTool

protected int runTool(Class<?> toolClass,
                      List<String> argsList)
               throws org.apache.maven.plugin.MojoExecutionException,
                      org.apache.maven.plugin.MojoFailureException
Runs the tool.

Parameters:
toolClass - the tool class, not null
argsList - the argument flags, not null
Returns:
the number of changes
Throws:
org.apache.maven.plugin.MojoExecutionException - if an error occurs
org.apache.maven.plugin.MojoFailureException - if a failure occurs

obtainClassLoader

protected URLClassLoader obtainClassLoader()
                                    throws org.apache.maven.plugin.MojoExecutionException
Obtains the classloader from a set of file paths.

Returns:
the classloader, not null
Throws:
org.apache.maven.plugin.MojoExecutionException

obtainClasspath

protected List<String> obtainClasspath()
                                throws org.apache.maven.plugin.MojoExecutionException
Obtains the resolved classpath of dependencies.

Returns:
the classpath, not null
Throws:
org.apache.maven.plugin.MojoExecutionException


Copyright © 2013 Joda.org. All rights reserved.