com.vecna.maven.commons
Class AbstractClassLoaderSwappingMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.vecna.maven.commons.AbstractClassLoaderSwappingMojo
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
- BuildClassPathMojo
public abstract class AbstractClassLoaderSwappingMojo
- extends org.apache.maven.plugin.AbstractMojo
Base class for invoking Mojos with a custom classloader.
- Author:
- ogolberg@vecna.com
| Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
| 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 |
AbstractClassLoaderSwappingMojo
public AbstractClassLoaderSwappingMojo()
getClassLoader
protected abstract ClassLoader getClassLoader()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
- Get the custom class loader
- Returns:
- the custom class loader to use
- Throws:
org.apache.maven.plugin.MojoExecutionException - if an error occurs
org.apache.maven.plugin.MojoFailureException - if an error occurs
executeWithClassLoader
protected abstract void executeWithClassLoader()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
- This method will be executed in the custom class loader context
- Throws:
org.apache.maven.plugin.MojoExecutionException - if an error occurs
org.apache.maven.plugin.MojoFailureException - if an error occurs
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
Copyright © 2009-2011 Vecna Technologies. All Rights Reserved.