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.
  • Field Details

    • source

      @UnknownNull @Parameter(required=true) public String source
      The source folder or jar file that should be transformed.
    • target

      @UnknownNull @Parameter(required=true) public String target
      The target folder or jar file to where the transformed sources should be written to.
    • dependencies

      @MaybeNull @Parameter public List<CoordinateConfiguration> dependencies
      A list of dependencies to be included when resolving class files, additionally to the source jar.
  • Constructor Details

    • ForExplicitLocations

      public ForExplicitLocations()
  • Method Details

    • resolveClassPathElements

      protected List<String> resolveClassPathElements(Map<ByteBuddyMojo.Coordinate,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 class ByteBuddyMojo
      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 List<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(List<ByteBuddyMojo.Transformer> transformers, List<String> elements, Map<ByteBuddyMojo.Coordinate,String> coordinates) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException, IOException
      Description copied from class: ByteBuddyMojo
      Applies this mojo for the given setup.
      Specified by:
      apply in class ByteBuddyMojo
      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.