public class BytecodeInjectionMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Class and Description |
|---|---|
private class |
BytecodeInjectionMojo.BaseInjectionTarget |
private class |
BytecodeInjectionMojo.ConstantInjectionTarget |
static interface |
BytecodeInjectionMojo.InjectionTarget
Defines a strategy for applying injections.
|
private class |
BytecodeInjectionMojo.MethodBodyReturnReplacementTarget |
| Modifier and Type | Field and Description |
|---|---|
protected BytecodeInjection[] |
bytecodeInjections
The injections to be performed.
|
private javassist.ClassPool |
classPool |
private javassist.LoaderClassPath |
loaderClassPath |
protected org.apache.maven.project.MavenProject |
project
The Maven Project Object
|
| Constructor and Description |
|---|
BytecodeInjectionMojo() |
| Modifier and Type | Method and Description |
|---|---|
private java.lang.ClassLoader |
buildProjectCompileClassLoader()
Builds a
ClassLoader based on the maven project's compile classpath elements. |
void |
execute() |
private java.util.List<java.lang.String> |
projectCompileClasspathElements()
Essentially a call to
MavenProject.getCompileClasspathElements() except that here we
cast it to the generic type and internally handle DependencyResolutionRequiredException. |
protected org.apache.maven.project.MavenProject project
protected BytecodeInjection[] bytecodeInjections
private javassist.LoaderClassPath loaderClassPath
private javassist.ClassPool classPool
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprivate java.lang.ClassLoader buildProjectCompileClassLoader()
throws org.apache.maven.plugin.MojoExecutionException
ClassLoader based on the maven project's compile classpath elements.ClassLoader made up of the maven project's compile classpath elements.org.apache.maven.plugin.MojoExecutionException - Indicates an issue processing one of the classpath elementsprivate java.util.List<java.lang.String> projectCompileClasspathElements()
throws org.apache.maven.plugin.MojoExecutionException
MavenProject.getCompileClasspathElements() except that here we
cast it to the generic type and internally handle DependencyResolutionRequiredException.org.apache.maven.plugin.MojoExecutionException - Indicates a DependencyResolutionRequiredException was encountered