Package net.bytebuddy.build.maven
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 class
A Byte Buddy plugin that transforms a project's production class files.static class
A Byte Buddy plugin that transforms a project's test class files.Nested classes/interfaces inherited from class net.bytebuddy.build.maven.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.BuildContext
The build context to support incremental builds.boolean
Determines if plugins are attempted to be built incrementally.Fields inherited from class net.bytebuddy.build.maven.ByteBuddyMojo
classPathDiscovery, discovery, execution, extendedParsing, failFast, failOnLiveInitializer, initialization, multiReleaseVersion, project, repositorySystem, repositorySystemSession, skip, staleMilliseconds, suffix, threads, transformations, warnOnEmptyTypeSet, warnOnMissingOutputDirectory
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
apply
(List<ByteBuddyMojo.Transformer> transformers, List<String> elements, Map<ByteBuddyMojo.Coordinate, String> coordinates) Applies this mojo for the given setup.protected abstract String
Returns the output directory to search for class files.protected abstract String
Returns the source directory that determines the class files to process.Methods inherited from class net.bytebuddy.build.maven.ByteBuddyMojo
execute, resolveClassPathElements, transform
Methods 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, IOExceptionDescription copied from class:ByteBuddyMojo
Applies this mojo for the given setup.- Specified by:
apply
in 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.
-