Package net.bytebuddy.build.maven
Class ByteBuddyMojo.ForExplicitLocations
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- net.bytebuddy.build.maven.ByteBuddyMojo
-
- net.bytebuddy.build.maven.ByteBuddyMojo.ForExplicitLocations
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
ByteBuddyMojo.ForExplicitLocations.ForTestTypes
,ByteBuddyMojo.ForExplicitLocations.WithExtendedDependencies
,ByteBuddyMojo.ForExplicitLocations.WithoutRuntimeDependencies
,ByteBuddyMojo.ForExplicitLocations.WithRuntimeDependencies
- Enclosing class:
- ByteBuddyMojo
@Mojo(name="transform-location-empty", defaultPhase=PROCESS_CLASSES, threadSafe=true) public static class ByteBuddyMojo.ForExplicitLocations extends ByteBuddyMojo
Transforms specified classes from files in a folder or a jar file to a folder or jar file.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ByteBuddyMojo.ForExplicitLocations.ForTestTypes
Transforms specified classes from files in a folder or a jar file to a folder or jar file.static class
ByteBuddyMojo.ForExplicitLocations.WithExtendedDependencies
Transforms specified classes from files in a folder or a jar file to a folder or jar file.static class
ByteBuddyMojo.ForExplicitLocations.WithoutRuntimeDependencies
Transforms specified classes from files in a folder or a jar file to a folder or jar file.static class
ByteBuddyMojo.ForExplicitLocations.WithRuntimeDependencies
Transforms specified classes from files in a folder or a jar file to a folder or jar file.-
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 java.util.List<CoordinateConfiguration>
dependencies
A list of dependencies to be included when resolving class files, additionally to the source jar.java.lang.String
source
The source folder or jar file that should be transformed.java.lang.String
target
The target folder or jar file to where the transformed sources should be written to.-
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 ForExplicitLocations()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
Applies this mojo for the given setup.protected java.util.List<java.lang.String>
resolveClassPathElements(java.util.Map<ByteBuddyMojo.Coordinate,java.lang.String> coordinates)
Resolves the class path elements of the relevant output directory.protected java.util.List<java.lang.String>
resolveImplicitClassPathElements()
Resolves any implicit dependencies that should be added to the class path.-
Methods inherited from class net.bytebuddy.build.maven.ByteBuddyMojo
execute, transform
-
-
-
-
Field Detail
-
source
@UnknownNull @Parameter(required=true) public java.lang.String source
The source folder or jar file that should be transformed.
-
target
@UnknownNull @Parameter(required=true) public java.lang.String target
The target folder or jar file to where the transformed sources should be written to.
-
dependencies
@MaybeNull @Parameter public java.util.List<CoordinateConfiguration> dependencies
A list of dependencies to be included when resolving class files, additionally to the source jar.
-
-
Method Detail
-
resolveClassPathElements
protected java.util.List<java.lang.String> resolveClassPathElements(java.util.Map<ByteBuddyMojo.Coordinate,java.lang.String> coordinates) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
Description copied from class:ByteBuddyMojo
Resolves the class path elements of the relevant output directory.- Specified by:
resolveClassPathElements
in classByteBuddyMojo
- Parameters:
coordinates
- Versions for managed dependencies.- Returns:
- The class path elements of the relevant output directory.
- Throws:
org.apache.maven.plugin.MojoExecutionException
- If the user configuration results in an error.org.apache.maven.plugin.MojoFailureException
- If the plugin application raises an error.
-
resolveImplicitClassPathElements
protected java.util.List<java.lang.String> resolveImplicitClassPathElements() throws org.apache.maven.plugin.MojoFailureException
Resolves any implicit dependencies that should be added to the class path.- Returns:
- The class path elements of the relevant output directory.
- Throws:
org.apache.maven.plugin.MojoFailureException
- If the class loader resolution yields a failure.
-
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, org.apache.maven.plugin.MojoFailureException, java.io.IOException
Description 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.org.apache.maven.plugin.MojoFailureException
- If the plugin fails due to an application error.java.io.IOException
- If an I/O exception occurs.
-
-