Package net.bytebuddy.build.maven
Class ByteBuddyMojo.ForDependencyFolder
java.lang.Object
org.apache.maven.plugin.AbstractMojo
net.bytebuddy.build.maven.ByteBuddyMojo
net.bytebuddy.build.maven.ByteBuddyMojo.ForDependencyFolder
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Enclosing class:
ByteBuddyMojo
@Mojo(name="transform-dependencies",
defaultPhase=PROCESS_CLASSES,
threadSafe=true,
requiresDependencyResolution=COMPILE)
public static class ByteBuddyMojo.ForDependencyFolder
extends ByteBuddyMojo
Transforms all jars for a folder containing jar files, typically project dependencies.
-
Nested Class Summary
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 TypeFieldDescriptionThe source folder that contains the project's dependencies.The target folder that contains the project's dependencies ornull
if thesource
folder should be used.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.resolveClassPathElements
(Map<ByteBuddyMojo.Coordinate, String> coordinates) Resolves the class path elements of the relevant output directory.Methods inherited from class net.bytebuddy.build.maven.ByteBuddyMojo
execute, transform
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
source
The source folder that contains the project's dependencies. -
target
The target folder that contains the project's dependencies ornull
if thesource
folder should be used.
-
-
Constructor Details
-
ForDependencyFolder
public ForDependencyFolder()
-
-
Method Details
-
resolveClassPathElements
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.
-
apply
protected void apply(List<ByteBuddyMojo.Transformer> transformers, List<String> elements, Map<ByteBuddyMojo.Coordinate, String> coordinates) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException, 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.org.apache.maven.plugin.MojoFailureException
- If the plugin fails due to an application error.IOException
- If an I/O exception occurs.
-