spring-boot:repackage

Full name:

org.springframework.boot:spring-boot-maven-plugin:1.1.4.RELEASE:repackage

Description:

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).

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: compile+runtime.
  • Requires dependency collection of artifacts in scope: compile+runtime.
  • The goal is thread-safe and supports parallel builds.
  • Since version: 1.1.
  • Binds by default to the lifecycle phase: package.

Required Parameters

Name Type Since Description
finalName String 1.0 Name of the generated archive.
Default value is: ${project.build.finalName}.
outputDirectory File 1.0 Directory containing the generated archive.
Default value is: ${project.build.directory}.

Optional Parameters

Name Type Since Description
classifier String 1.0 Classifier to add to the artifact generated. If given, the artifact will be attached. If this is not given, it will merely be written to the output directory according to the finalName. Attaching the artifact allows to deploy it alongside to the original one, see the maven documentation for more details.
excludeArtifactIds String 1.1 Comma separated list of artifact names to exclude (exact match).
User property is: excludeArtifactIds.
excludeGroupIds String 1.1 Comma separated list of groupId names to exclude (exact match).
User property is: excludeGroupIds.
excludes List 1.1 Collection of artifact definitions to exclude. The Exclude element defines a groupId and artifactId mandatory properties and an optional classifier property.
layout RepackageMojo$LayoutType 1.0 The type of archive (which corresponds to how the dependencies are laid out inside it). Possible values are JAR, WAR, ZIP, DIR, NONE. Defaults to a guess based on the archive type.
mainClass String 1.0 The name of the main class. If not specified the first compiled class found that contains a 'main' method will be used.
requiresUnpack List 1.1 A list of the libraries that must be unpacked from fat jars in order to run.

Parameter Details

classifier:

Classifier to add to the artifact generated. If given, the artifact will be attached. If this is not given, it will merely be written to the output directory according to the finalName. Attaching the artifact allows to deploy it alongside to the original one, see the maven documentation for more details.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No

excludeArtifactIds:

Comma separated list of artifact names to exclude (exact match).
  • Type: java.lang.String
  • Since: 1.1
  • Required: No
  • User Property: excludeArtifactIds

excludeGroupIds:

Comma separated list of groupId names to exclude (exact match).
  • Type: java.lang.String
  • Since: 1.1
  • Required: No
  • User Property: excludeGroupIds

excludes:

Collection of artifact definitions to exclude. The Exclude element defines a groupId and artifactId mandatory properties and an optional classifier property.
  • Type: java.util.List
  • Since: 1.1
  • Required: No

finalName:

Name of the generated archive.
  • Type: java.lang.String
  • Since: 1.0
  • Required: Yes
  • Default: ${project.build.finalName}

layout:

The type of archive (which corresponds to how the dependencies are laid out inside it). Possible values are JAR, WAR, ZIP, DIR, NONE. Defaults to a guess based on the archive type.
  • Type: org.springframework.boot.maven.RepackageMojo$LayoutType
  • Since: 1.0
  • Required: No

mainClass:

The name of the main class. If not specified the first compiled class found that contains a 'main' method will be used.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No

outputDirectory:

Directory containing the generated archive.
  • Type: java.io.File
  • Since: 1.0
  • Required: Yes
  • Default: ${project.build.directory}

requiresUnpack:

A list of the libraries that must be unpacked from fat jars in order to run.
  • Type: java.util.List
  • Since: 1.1
  • Required: No