Fork me on GitHub

repack:repack

Full name:

org.basepom.maven:repack-maven-plugin:1.0.2:repack

Description:

Repack archives for execution using java -jar. Can also be used to repack a jar with nested dependencies by using layout=NONE.

Attributes:

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

Optional Parameters

Name Type Since Description
<attachRepackedArtifact> boolean - Attach the repacked archive to the build cycle.
Default: true
User Property: repack.attach-artifact
<excludedDependencies> String[] - No description.
Alias: excludedDependencies
<finalName> String - Name of the generated archive.
Default: ${project.build.finalName}
User Property: repack.final-name
<includedDependencies> String[] - No description.
Alias: includes
<includeOptional> boolean - Include optional dependencies
Default: false
User Property: repack.include-optional
<includeProvidedScope> boolean - Include provided scoped dependencies.
Default: false
User Property: repack.include-provided-scope
<includeSystemScope> boolean - Include system scoped dependencies.
Default: false
User Property: repack.include-system-scope
<layout> LayoutType - 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 JAR.
Default: JAR
User Property: repack.layout
<layoutFactory> LayoutFactory - The layout factory that will be used to create the executable archive if no explicit layout is set. Alternative layouts implementations can be provided by 3rd parties.
<mainClass> String - The name of the main class. If not specified the first compiled class found that contains a main method will be used.
User Property: repack.main-class
<optionalDependencies> String[] - No description.
<outputDirectory> File - Directory containing the generated archive.
Default: ${project.build.directory}
User Property: repack.output-directory
<outputTimestamp> String - Timestamp for reproducible output archive entries, either formatted as ISO 8601 (yyyy-MM-dd'T'HH:mm:ssXXX) or an int representing seconds since the epoch.
Default: ${project.build.outputTimestamp}
User Property: repack.output-timestamp
<quiet> boolean - Silence all non-output and non-error messages.
Default: false
User Property: repack.quiet
<repackClassifier> String - Classifier to add to the repacked archive. Use the blank string to replace the main artifact.
Default: repacked
User Property: repack.classifier
<report> boolean - Do a summary report.
Default: true
User Property: repack.report
<runtimeUnpackedDependencies> String[] - No description.
<skip> boolean - Skip the execution.
Default: false
User Property: repack.skip

Parameter Details

<attachRepackedArtifact>

Attach the repacked archive to the build cycle.
  • Type: boolean
  • Required: No
  • User Property: repack.attach-artifact
  • Default: true

<excludedDependencies>

No description.
  • Type: java.lang.String[]
  • Required: No
  • Alias: excludedDependencies

<finalName>

Name of the generated archive.
  • Type: java.lang.String
  • Required: No
  • User Property: repack.final-name
  • Default: ${project.build.finalName}

<includedDependencies>

No description.
  • Type: java.lang.String[]
  • Required: No
  • Alias: includes

<includeOptional>

Include optional dependencies
  • Type: boolean
  • Required: No
  • User Property: repack.include-optional
  • Default: false

<includeProvidedScope>

Include provided scoped dependencies.
  • Type: boolean
  • Required: No
  • User Property: repack.include-provided-scope
  • Default: false

<includeSystemScope>

Include system scoped dependencies.
  • Type: boolean
  • Required: No
  • User Property: repack.include-system-scope
  • Default: false

<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 JAR.
  • Type: org.basepom.mojo.repack.LayoutType
  • Required: No
  • User Property: repack.layout
  • Default: JAR

<layoutFactory>

The layout factory that will be used to create the executable archive if no explicit layout is set. Alternative layouts implementations can be provided by 3rd parties.
  • Type: org.springframework.boot.loader.tools.LayoutFactory
  • 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
  • Required: No
  • User Property: repack.main-class

<optionalDependencies>

No description.
  • Type: java.lang.String[]
  • Required: No

<outputDirectory>

Directory containing the generated archive.
  • Type: java.io.File
  • Required: No
  • User Property: repack.output-directory
  • Default: ${project.build.directory}

<outputTimestamp>

Timestamp for reproducible output archive entries, either formatted as ISO 8601 (yyyy-MM-dd'T'HH:mm:ssXXX) or an int representing seconds since the epoch.
  • Type: java.lang.String
  • Required: No
  • User Property: repack.output-timestamp
  • Default: ${project.build.outputTimestamp}

<quiet>

Silence all non-output and non-error messages.
  • Type: boolean
  • Required: No
  • User Property: repack.quiet
  • Default: false

<repackClassifier>

Classifier to add to the repacked archive. Use the blank string to replace the main artifact.
  • Type: java.lang.String
  • Required: No
  • User Property: repack.classifier
  • Default: repacked

<report>

Do a summary report.
  • Type: boolean
  • Required: No
  • User Property: repack.report
  • Default: true

<runtimeUnpackedDependencies>

No description.
  • Type: java.lang.String[]
  • Required: No

Skip the execution.
  • Type: boolean
  • Required: No
  • User Property: repack.skip
  • Default: false