Class ByteBuddyMojo.ForLifecycleTypes
java.lang.Object
org.apache.maven.plugin.AbstractMojo
net.bytebuddy.build.maven.ByteBuddyMojo
net.bytebuddy.build.maven.ByteBuddyMojo.ForLifecycleTypes
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
ByteBuddyMojo.ForLifecycleTypes.ForProductionTypes, ByteBuddyMojo.ForLifecycleTypes.ForTestTypes
- Enclosing class:
ByteBuddyMojo
A version of the plugin that is bound to Maven's lifecycle.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA Byte Buddy plugin that transforms a project's production class files.static classA Byte Buddy plugin that transforms a project's test class files.Nested classes/interfaces inherited from class ByteBuddyMojo
ByteBuddyMojo.Coordinate, ByteBuddyMojo.ForDependencyFolder, ByteBuddyMojo.ForExplicitLocations, ByteBuddyMojo.ForLifecycleTypes, ByteBuddyMojo.MavenBuildLogger, ByteBuddyMojo.StalenessFilter, ByteBuddyMojo.TransformationLogger, ByteBuddyMojo.Transformer -
Field Summary
FieldsModifier and TypeFieldDescriptionorg.sonatype.plexus.build.incremental.BuildContextThe build context to support incremental builds.booleanDetermines if plugins are attempted to be built incrementally.Fields inherited from class ByteBuddyMojo
classPathDiscovery, discovery, execution, extendedParsing, failFast, failOnLiveInitializer, initialization, multiReleaseVersion, project, repositorySystem, repositorySystemSession, skip, staleMilliseconds, suffix, threads, transformations, warnOnEmptyTypeSet, warnOnMissingOutputDirectoryFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapply(List<ByteBuddyMojo.Transformer> transformers, List<String> elements, Map<ByteBuddyMojo.Coordinate, String> coordinates) Applies this mojo for the given setup.protected abstract StringReturns the output directory to search for class files.protected abstract StringReturns the source directory that determines the class files to process.Methods inherited from class ByteBuddyMojo
execute, resolveClassPathElements, transformMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
context
The build context to support incremental builds. -
incremental
@Parameter(defaultValue="false", required=true) public boolean incrementalDetermines if plugins are attempted to be built incrementally.
-
-
Constructor Details
-
ForLifecycleTypes
public ForLifecycleTypes()
-
-
Method Details
-
getOutputDirectory
Returns the output directory to search for class files.- Returns:
- The output directory to search for class files.
-
getSourceDirectory
Returns the source directory that determines the class files to process.- Returns:
- The source directory that serves as an input for the transformation.
-
apply
protected void apply(List<ByteBuddyMojo.Transformer> transformers, List<String> elements, Map<ByteBuddyMojo.Coordinate, String> coordinates) throws org.apache.maven.plugin.MojoExecutionException, IOException Description copied from class:ByteBuddyMojoApplies this mojo for the given setup.- Specified by:
applyin classByteBuddyMojo- Parameters:
transformers- The transformers to apply.elements- The class path elements to consider.coordinates- Versions for managed dependencies.- Throws:
org.apache.maven.plugin.MojoExecutionException- If the plugin fails due to a user error.IOException- If an I/O exception occurs.
-