Plugin Documentation

Goals available for this plugin:

Goal Description
keytool:changeAlias To change an entry alias into a keystore. Implemented as a wrapper around the SDK keytool -keyclone (jdk 1.5) or keytool -changealias (jdk 1.6) command. See keystore documentation.
keytool:changeKeyPassword To change the key password of an entry of a keystore. Implemented as a wrapper around the SDK keytool -keypasswd command. See keystore documentation.
keytool:changeStorePassword To change the store password of a keystore. Implemented as a wrapper around the SDK keytool -storepasswd command. See keystore documentation.
keytool:clean A Mojo that deletes a generated keystore file.
keytool:deleteAlias To delete an entry alias from a keystore. Implemented as a wrapper around the SDK keytool -delete command. See keystore documentation.
keytool:exportCertificate To export a certificate from a keystore. Implemented as a wrapper around the SDK keytool -export command. See keystore documentation.
keytool:generateCertificate To generate certificate from a certificate request from a keystore. Implemented as a wrapper around the SDK keytool -gencert command. Note This operation was not implemented by the keytool before jdk 1.7. See keystore documentation.
keytool:generateCertificateRequest To generate certificate request. Implemented as a wrapper around the SDK keytool -certreq command. See keystore documentation.
keytool:generateKeyPair 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.
keytool:generateSecretKey To generate a secret key into a keystore. Implemented as a wrapper around the SDK keytool -genseckey command. See keystore documentation.
keytool:help Display help information on keytool-maven-plugin.
Call mvn keytool:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
keytool:importCertificate To import a certificate into a keystore. Implemented as a wrapper around the SDK keytool -import (jdk 1.5) or keytool -importcert (jdk 1.6) command. See keystore documentation. Since version 1.2, this mojo replace the mojo import.
keytool:importKeystore To import all entries of a keystore to another keystore. Implemented as a wrapper around the SDK keytool -importkeystore command. Note This operation was not implemented by the keytool before jdk 1.6. See keystore documentation.
keytool:list To list entries in a keystore. Implemented as a wrapper around the SDK keytool -list (jdk 1.5) command. See keystore documentation.
keytool:printCertificate To print the content of a certificate. Implemented as a wrapper around the SDK keytool -printcert command. See keystore documentation.
keytool:printCertificateRequest To print the content of a certificate request. Implemented as a wrapper around the SDK keytool -printcertreq command. Note This operation was not implemented by the keytool before jdk 1.7. See keystore documentation.
keytool:printCRLFile To print the content of a CRL file. Implemented as a wrapper around the SDK keytool -printcrl command. Note This operation was not implemented by the keytool before jdk 1.7. See keystore documentation.

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven 2.1.0
JDK 1.5
Memory No minimum requirement.
Disk Space No minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>keytool-maven-plugin</artifactId>
          <version>1.6-SNAPSHOT</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>keytool-maven-plugin</artifactId>
        <version>1.6-SNAPSHOT</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"