Class RepackageMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="repackage", defaultPhase=PACKAGE, requiresProject=true, threadSafe=true, requiresDependencyResolution=COMPILE_PLUS_RUNTIME, requiresDependencyCollection=COMPILE_PLUS_RUNTIME) public class RepackageMojo extends AbstractPackagerMojo
Repackage existing JAR and WAR archives so that they can be executed from the command line using java -jar. With layout=NONE can also be used simply to package a JAR with nested dependencies (and no main class, so not executable).
Since:
1.0.0
Author:
Phillip Webb, Dave Syer, Stephane Nicoll, Björn Lindström, Scott Frederick
  • Constructor Details

    • RepackageMojo

      public RepackageMojo()
  • Method Details

    • getLayout

      protected AbstractPackagerMojo.LayoutType getLayout()
      Return the type of archive that should be packaged by this MOJO.
      Overrides:
      getLayout in class AbstractPackagerMojo
      Returns:
      the value of the layout parameter, or null if the parameter is not provided
    • getLayoutFactory

      protected org.springframework.boot.loader.tools.LayoutFactory getLayoutFactory()
      Return the layout factory that will be used to determine the AbstractPackagerMojo.LayoutType if no explicit layout is set.
      Overrides:
      getLayoutFactory in class AbstractPackagerMojo
      Returns:
      the value of the layoutFactory parameter, or null if the parameter is not provided
    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException