jar:sign

Full name:

org.apache.maven.plugins:maven-jar-plugin:2.3.2:sign

This plugin goal has been deprecated:

As of version 2.3, this goal is no longer supported in favor of the dedicated maven-jarsigner-plugin.

Description:

Signs a JAR using jarsigner.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: runtime.
  • Binds by default to the lifecycle phase: package.

Required Parameters

Name Type Since Description
alias String - See options.
finalName String - Name of the generated JAR (without classifier and extension).
workingDirectory File - The working directory in which the jarsigner executable will be run.
Default value is: ${basedir}.

Optional Parameters

Name Type Since Description
classifier String - Classifier to use for the generated artifact. If not specified, the generated artifact becomes the primary artifact.
jarPath File - Path of the jar to sign. When specified, the finalName is ignored.
Default value is: ${project.build.directory}/${project.build.finalName}.${project.packaging}.
keypass String - See options.
keystore String - See options.
sigfile String - See options.
signedjar File - See options.

Not specifying this argument will sign the jar in-place (your original jar is going to be overwritten).
skip boolean - Set this to true to disable signing. Useful to speed up build process in development environment.
Default value is: false.
storepass String - See options.
type String - See options. The corresponding option in the command line is -storetype.
verbose boolean - Enable verbose. See options.
Default value is: false.
verify boolean - Automatically verify a jar after signing it.

See options.
Default value is: false.

Parameter Details

alias:

See options.
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${alias}

classifier:

Classifier to use for the generated artifact. If not specified, the generated artifact becomes the primary artifact.
  • Type: java.lang.String
  • Required: No
  • Expression: ${classifier}

finalName:

Name of the generated JAR (without classifier and extension).
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${project.build.finalName}

jarPath:

Path of the jar to sign. When specified, the finalName is ignored.
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.directory}/${project.build.finalName}.${project.packaging}

keypass:

See options.
  • Type: java.lang.String
  • Required: No
  • Expression: ${keypass}

keystore:

See options.
  • Type: java.lang.String
  • Required: No
  • Expression: ${keystore}

sigfile:

See options.
  • Type: java.lang.String
  • Required: No
  • Expression: ${sigfile}

signedjar:

See options.

Not specifying this argument will sign the jar in-place (your original jar is going to be overwritten).
  • Type: java.io.File
  • Required: No
  • Expression: ${signedjar}

skip:

Set this to true to disable signing. Useful to speed up build process in development environment.
  • Type: boolean
  • Required: No
  • Expression: ${maven.jar.sign.skip}
  • Default: false

storepass:

See options.
  • Type: java.lang.String
  • Required: No
  • Expression: ${storepass}

type:

See options. The corresponding option in the command line is -storetype.
  • Type: java.lang.String
  • Required: No
  • Expression: ${type}

verbose:

Enable verbose. See options.
  • Type: boolean
  • Required: No
  • Expression: ${verbose}
  • Default: false

verify:

Automatically verify a jar after signing it.

See options.
  • Type: boolean
  • Required: No
  • Expression: ${verify}
  • Default: false

workingDirectory:

The working directory in which the jarsigner executable will be run.
  • Type: java.io.File
  • Required: Yes
  • Expression: ${workingdir}
  • Default: ${basedir}