jar:sign-verify

Checks the signature of a signed jar using jarsigner.

Mojo Attributes:

  • Requires a Maven 2.0 project to execute.
  • Requires dependency resolution of artifacts in scope: runtime
  • Automatically executes within the lifecycle phase: package

Required Parameters

Name Type Description
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 Description
checkCerts boolean Check certificates. Requires {@link #setVerbose(boolean)}. See options. Default value is false.
errorWhenNotSigned boolean When true this will make the execute() operation fail, throwing an exception, when verifying a non signed jar. Primarily to keep backwards compatibility with existing code, and allow reusing the bean in unattended operations when set to false. Default value is true.
jarPath File Path of the signed jar. When specified, the finalName is ignored.
verbose boolean Enable verbose See options. Default value is false.

Parameter Details

checkCerts Check certificates. Requires {@link #setVerbose(boolean)}. See options.
  • Type: boolean
  • Required: No
  • Expression: ${checkcerts}
  • Default: false

errorWhenNotSigned When true this will make the execute() operation fail, throwing an exception, when verifying a non signed jar. Primarily to keep backwards compatibility with existing code, and allow reusing the bean in unattended operations when set to false.
  • Type: boolean
  • Required: No
  • Expression: ${errorWhenNotSigned}
  • Default: true

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

jarPath Path of the signed jar. When specified, the finalName is ignored.
  • Type: java.io.File
  • Required: No
  • Expression: ${jarpath}

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

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