Package org.springframework.boot.maven
Class RepackageMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.springframework.boot.maven.AbstractDependencyFilterMojo
org.springframework.boot.maven.AbstractPackagerMojo
org.springframework.boot.maven.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 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
- 
Nested Class SummaryNested classes/interfaces inherited from class org.springframework.boot.maven.AbstractPackagerMojoAbstractPackagerMojo.LayoutTypeNested classes/interfaces inherited from class org.springframework.boot.maven.AbstractDependencyFilterMojoAbstractDependencyFilterMojo.ExcludeTestScopeArtifactFilter, AbstractDependencyFilterMojo.RuntimeArtifactFilter
- 
Field SummaryFields inherited from class org.springframework.boot.maven.AbstractPackagerMojoincludeSystemScope, project, projectHelper, sessionFields inherited from interface org.apache.maven.plugin.MojoROLE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidexecute()protected AbstractPackagerMojo.LayoutTypeReturn the type of archive that should be packaged by this MOJO.protected org.springframework.boot.loader.tools.LayoutFactoryReturn the layout factory that will be used to determine theAbstractPackagerMojo.LayoutTypeif no explicit layout is set.protected org.springframework.boot.loader.tools.LoaderImplementationReturn the loader implementation that should be used.Methods inherited from class org.springframework.boot.maven.AbstractPackagerMojogetConfiguredPackager, getLibraries, getSourceArtifact, getTargetFileMethods inherited from class org.springframework.boot.maven.AbstractDependencyFilterMojofilterDependencies, getDependencyURLs, setExcludeGroupIds, setExcludes, setIncludes, toURLMethods inherited from class org.apache.maven.plugin.AbstractMojogetLog, getPluginContext, setLog, setPluginContext
- 
Constructor Details- 
RepackageMojopublic RepackageMojo()
 
- 
- 
Method Details- 
getLayoutReturn the type of archive that should be packaged by this MOJO.- Overrides:
- getLayoutin class- AbstractPackagerMojo
- Returns:
- the value of the layoutparameter, ornullif the parameter is not provided
 
- 
getLoaderImplementationprotected org.springframework.boot.loader.tools.LoaderImplementation getLoaderImplementation()Description copied from class:AbstractPackagerMojoReturn the loader implementation that should be used.- Overrides:
- getLoaderImplementationin class- AbstractPackagerMojo
- Returns:
- the loader implementation or null
 
- 
getLayoutFactoryprotected org.springframework.boot.loader.tools.LayoutFactory getLayoutFactory()Return the layout factory that will be used to determine theAbstractPackagerMojo.LayoutTypeif no explicit layout is set.- Overrides:
- getLayoutFactoryin class- AbstractPackagerMojo
- Returns:
- the value of the layoutFactoryparameter, ornullif the parameter is not provided
 
- 
executepublic void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
- org.apache.maven.plugin.MojoExecutionException
- org.apache.maven.plugin.MojoFailureException
 
 
-