VerifyJar

Description

Verifies JAR files with the jarsigner command line tool. It will take a named file in the jar attribute. Nested paths are also supported.

Parameters

Attribute Description Required
jar the jar file to verify Yes, unless nested paths have been used
alias the alias to verify under Yes
storepass password for keystore integrity. Note that jarsigner does not read the password from stdin during verification, so the password must be send via a command line interface and may be visible to other users of the system. No
keystore keystore location No
storetype keystore type No
keypass password for private key (if different) No
certificates (true|false) display information about certificates No; default false
verbose (true|false) verbose output when verifying No; default false
strict (true|false) strict checking when verifying.
since Ant 1.9.1.
No; default false
maxmemory Specifies the maximum memory the jarsigner JVM will use. Specified in the style of standard Java memory specs (e.g. 128m = 128 MBytes) No
executable Specify a particular jarsigner executable to use in place of the default binary (found in the same JDK as Apache Ant is running in).
Must support the same command line options as the Sun JDK jarsigner command. since Ant 1.8.0.
No
providername name of a cryptographic service provider's name when listed in the security properties file. since Ant 1.10.6. No
providerclass name of a cryptographic service provider's master class file when the service provider is not listed in the security properties file. since Ant 1.10.6. No
providerarg Represents an optional string input argument for the constructor of provider_class_name. Ignored if providerclass is not set. since Ant 1.10.6. No

Parameters as nested elements

Attribute Description Required
path path of JAR files to verify. since Ant 1.7 No
fileset fileset of JAR files to verify. No
sysproperty JVM system properties, with the syntax of Ant environment variables No, and only one can be supplied
arg Use this to specify a keytool command line argument not explicitly supported via an attribute. since Ant 1.10.6. No

Examples

Verify the ant.jar with alias apache-group accessing the keystore and private key via secret password.

<verifyjar jar="${dist}/lib/ant.jar"
           alias="apache-group" storepass="secret"/>