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
public abstract static class ByteBuddyMojo.ForLifecycleTypes extends ByteBuddyMojo
A version of the plugin that is bound to Maven's lifecycle.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classByteBuddyMojo.ForLifecycleTypes.ForProductionTypesA Byte Buddy plugin that transforms a project's production class files.static classByteBuddyMojo.ForLifecycleTypes.ForTestTypesA 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
Fields Modifier and Type Field Description org.sonatype.plexus.build.incremental.BuildContextcontextThe build context to support incremental builds.booleanincrementalDetermines 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
-
-
Constructor Summary
Constructors Constructor Description ForLifecycleTypes()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidapply(java.util.List<ByteBuddyMojo.Transformer> transformers, java.util.List<java.lang.String> elements, java.util.Map<ByteBuddyMojo.Coordinate,java.lang.String> coordinates)Applies this mojo for the given setup.protected abstract java.lang.StringgetOutputDirectory()Returns the output directory to search for class files.protected abstract java.lang.StringgetSourceDirectory()Returns the source directory that determines the class files to process.-
Methods inherited from class net.bytebuddy.build.maven.ByteBuddyMojo
execute, resolveClassPathElements, transform
-
-
-
-
Field Detail
-
context
@MaybeNull @Component public org.sonatype.plexus.build.incremental.BuildContext 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.
-
-
Method Detail
-
getOutputDirectory
protected abstract java.lang.String getOutputDirectory()
Returns the output directory to search for class files.- Returns:
- The output directory to search for class files.
-
getSourceDirectory
@MaybeNull protected abstract java.lang.String 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(java.util.List<ByteBuddyMojo.Transformer> transformers, java.util.List<java.lang.String> elements, java.util.Map<ByteBuddyMojo.Coordinate,java.lang.String> coordinates) throws org.apache.maven.plugin.MojoExecutionException, java.io.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.java.io.IOException- If an I/O exception occurs.
-
-