Fork me on GitHub

Plugin Details

This report describes goals, parameters details, requirements and sample usage of this plugin.

Goals

Goals available for this plugin:

Goal Description
keytool:changeAlias To change an entry alias into a keystore. Uses Java KeyStore API directly. See keytool documentation.
keytool:changeKeyPassword To change the key password of an entry of a keystore. Uses Java KeyStore API directly. See keytool documentation.
keytool:changeStorePassword To change the store password of a keystore. Uses Java KeyStore API directly. See keystore documentation.
keytool:clean A Mojo that deletes a generated keystore file.
keytool:deleteAlias To delete an entry alias from a keystore using Java KeyStore API. See keytool documentation.
keytool:exportCertificate To export a certificate from a keystore using Java KeyStore API. See keytool documentation.
keytool:generateCertificate To generate certificate from a certificate request using Bouncy Castle.
keytool:generateCertificateRequest To generate certificate request using Bouncy Castle.
keytool:generateKeyPair To generate a key pair into a keystore. Uses Bouncy Castle for certificate generation.
keytool:generateSecretKey To generate a secret key into a keystore. Uses Java KeyStore API directly. 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 using Java KeyStore API.

This Mojo has been refactored to use Java's KeyStore API directly instead of executing external keytool command, providing better performance and error handling.

See keytool documentation.

keytool:importKeystore To import all entries of a keystore to another keystore. Uses Java KeyStore API directly. Note This operation was not implemented by the keytool before jdk 1.6. See keytool documentation.
keytool:list To list entries in a keystore using Java KeyStore API. See keytool documentation.
keytool:printCRLFile To print the content of a CRL file. Uses Java Certificate API directly. Note This operation was not implemented by the keytool before jdk 1.7. See keystore documentation.
keytool:printCertificate To print the content of a certificate. Uses Java Certificate API directly. See keystore documentation.
keytool:printCertificateRequest To print the content of a certificate request. Uses Java Certificate API and Bouncy Castle for PKCS#10 parsing. 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 3.9
JDK 1.8

System Requirements History

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

Plugin Version Maven JDK
from 2.0.0 to 2.0.2 3.9 8
from 1.6 to 1.7 3.2.5 8
from 1.4 to 1.5 2.1.0 5
from 1.2 to 1.3 2.0.6 5
1.1 2.0.6 1.4
1.0 2.0.6 -
1.0-beta-1 - -

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>2.0.2</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>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

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