Fork me on GitHub

repack:repack

Full name:

org.basepom.maven:repack-maven-plugin:1.0.0: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 value is: true.
User property is: repack.attach-artifact.
<excludedDependencies> Set<DependencyDefinition> - Collection of artifact definitions to exclude.
Alias is: excludedDependencies.
<finalName> String - Name of the generated archive.
Default value is: ${project.build.finalName}.
User property is: repack.final-name.
<includedDependencies> Set<DependencyDefinition> - Collection of artifact definitions to include.
Alias is: includes.
<includeOptional> boolean - Include optional dependencies
Default value is: false.
User property is: repack.include-optional.
<includeProvidedScope> boolean - Include provided scoped dependencies.
Default value is: false.
User property is: repack.include-provided-scope.
<includeSystemScope> boolean - Include system scoped dependencies.
Default value is: false.
User property is: 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 value is: JAR.
User property is: 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 is: repack.main-class.
<optionalDependencies> Set<DependencyDefinition> - A list of optional libraries that should be included even if optional dependencies are not included by default.
<outputDirectory> File - Directory containing the generated archive.
Default value is: ${project.build.directory}.
User property is: 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 value is: ${project.build.outputTimestamp}.
User property is: repack.output-timestamp.
<quiet> boolean - Silence all non-output and non-error messages.
Default value is: false.
User property is: repack.quiet.
<repackClassifier> String - Classifier to add to the repacked archive. Use the blank string to replace the main artifact.
Default value is: repacked.
User property is: repack.classifier.
<report> boolean - Do a summary report.
Default value is: true.
User property is: repack.report.
<runtimeUnpackedDependencies> Set<DependencyDefinition> - A list of the libraries that must be unpacked at runtime (do not work within the fat jar).
<skip> boolean - Skip the execution.
Default value is: false.
User property is: 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>

Collection of artifact definitions to exclude.
  • Type: java.util.Set<org.basepom.mojo.repack.DependencyDefinition>
  • 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>

Collection of artifact definitions to include.
  • Type: java.util.Set<org.basepom.mojo.repack.DependencyDefinition>
  • 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>

A list of optional libraries that should be included even if optional dependencies are not included by default.
  • Type: java.util.Set<org.basepom.mojo.repack.DependencyDefinition>
  • 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>

A list of the libraries that must be unpacked at runtime (do not work within the fat jar).
  • Type: java.util.Set<org.basepom.mojo.repack.DependencyDefinition>
  • Required: No

<skip>

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