Class RepackageMojo

  • 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 AbstractDependencyFilterMojo
    Repackages 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).
    • Field Detail

      • includeSystemScope

        @Parameter(defaultValue="false")
        public boolean includeSystemScope
        Include system scoped dependencies.
        Since:
        1.4
    • Method Detail

      • 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