keytool:generateKeyPair

Full name:

org.codehaus.mojo:keytool-maven-plugin:1.6-SNAPSHOT:generateKeyPair

Description:

To generate a key pair into a keystore. Implemented as a wrapper around the SDK keytool -genkey (jdk 1.5) keytool -genkeypair (jdk 1.6) command. See keystore documentation.

Attributes:

  • Requires a Maven project to be executed.
  • Since version: 1.2.

Required Parameters

Name Type Since Description
workingDirectory File 1.2 Where to execute the keytool command.
Default value is: ${basedir}.

Optional Parameters

Name Type Since Description
alias String 1.2 Alias name of the entry to process. See options.
arguments String[] 1.1 List of additional arguments to append to the keytool command line. Note: This parameter is left for compatibility reason but should be used at a last resort whenparameters are not found in dedicated mojo due to possible side-effects on parameters (see https://jira.codehaus.org/browse/MKEYTOOL-17)
dname String 1.2 Distinguished name. See options.
ext String 1.2 X.509 extension. See options.
keyalg String 1.2 Key algorithm name. See options.
keypass String 1.2 Key password. See options.
keysize String 1.2 Key bit size. See options.
keystore String 1.2 Keystore location. See options.
passwordProtected boolean 1.2 Password through protected mechanism. See options.
providerarg String 1.2 Provider argument. See options.
providerclass String 1.2 Provider class name. See options.
providername String 1.2 Provider name. See options.
providerpath String 1.2 Provider classpath. See options.
sigalg String 1.2 Signature algorithm name. See options.
skip boolean 1.1 Set to true to disable the plugin.
Default value is: false.
skipIfExist boolean 1.3 If value is true, then will do nothing if keystore already exists.
startdate String 1.2 Certificate validity start date/time. See options.
storepass String 1.2 Keystore password. See options.
storetype String 1.2 Keystore type. See options.
validity String 1.2 Validity number of days. See options.
verbose boolean 1.2 Enable verbose mode (in mojo and in keytool command). See options.
Default value is: false.

Parameter Details

alias:

Alias name of the entry to process. See options.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No

arguments:

List of additional arguments to append to the keytool command line. Note: This parameter is left for compatibility reason but should be used at a last resort whenparameters are not found in dedicated mojo due to possible side-effects on parameters (see https://jira.codehaus.org/browse/MKEYTOOL-17)
  • Type: java.lang.String[]
  • Since: 1.1
  • Required: No

dname:

Distinguished name. See options.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No

ext:

X.509 extension. See options.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No

keyalg:

Key algorithm name. See options.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No

keypass:

Key password. See options.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No

keysize:

Key bit size. See options.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No

keystore:

Keystore location. See options.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No

passwordProtected:

Password through protected mechanism. See options.
  • Type: boolean
  • Since: 1.2
  • Required: No

providerarg:

Provider argument. See options.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No

providerclass:

Provider class name. See options.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No

providername:

Provider name. See options.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No

providerpath:

Provider classpath. See options.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No

sigalg:

Signature algorithm name. See options.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No

skip:

Set to true to disable the plugin.
  • Type: boolean
  • Since: 1.1
  • Required: No
  • Default: false

skipIfExist:

If value is true, then will do nothing if keystore already exists.
  • Type: boolean
  • Since: 1.3
  • Required: No

startdate:

Certificate validity start date/time. See options.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No

storepass:

Keystore password. See options.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No

storetype:

Keystore type. See options.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No

validity:

Validity number of days. See options.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No

verbose:

Enable verbose mode (in mojo and in keytool command). See options.
  • Type: boolean
  • Since: 1.2
  • Required: No
  • Default: false

workingDirectory:

Where to execute the keytool command.
  • Type: java.io.File
  • Since: 1.2
  • Required: Yes
  • Default: ${basedir}