Package org.codehaus.mojo.keytool
Class GenerateCertificateMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.codehaus.mojo.keytool.AbstractKeyToolMojo
-
- org.codehaus.mojo.keytool.AbstractKeyToolRequestMojo<R>
-
- org.codehaus.mojo.keytool.AbstractKeyToolRequestWithKeyStoreParametersMojo<R>
-
- org.codehaus.mojo.keytool.AbstractKeyToolRequestWithKeyStoreAndAliasParametersMojo<KeyToolGenerateCertificateRequest>
-
- org.codehaus.mojo.keytool.GenerateCertificateMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="generateCertificate", requiresProject=true) public class GenerateCertificateMojo extends AbstractKeyToolRequestWithKeyStoreAndAliasParametersMojo<KeyToolGenerateCertificateRequest>
To generate certificate from a certificate request from a keystore. Implemented as a wrapper around the SDKkeytool -gencert
command. Note This operation was not implemented by the keytool before jdk 1.7. See keystore documentation.- Since:
- 1.2
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
dname
Distinguished name.private java.lang.String
ext
X.509 extension.private java.io.File
infile
input file name.private java.lang.String
keypass
Key password.private java.io.File
outfile
output file name.private boolean
rfc
Output in RFC style.private java.lang.String
sigalg
Signature algorithm name.private java.lang.String
startdate
Certificate validity start date/time.private java.lang.String
validity
Validity number of days.
-
Constructor Summary
Constructors Constructor Description GenerateCertificateMojo()
Default contructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected KeyToolGenerateCertificateRequest
createKeytoolRequest()
To prepare the incoming request, says fill it with mojo parameters.protected java.lang.String
getCommandlineInfo(org.apache.maven.shared.utils.cli.Commandline commandLine)
Gets a string representation of aCommandline
.-
Methods inherited from class org.codehaus.mojo.keytool.AbstractKeyToolRequestWithKeyStoreParametersMojo
createParentDirIfNecessary, getFile, getKeystoreFile
-
Methods inherited from class org.codehaus.mojo.keytool.AbstractKeyToolRequestMojo
consumeResult, execute
-
Methods inherited from class org.codehaus.mojo.keytool.AbstractKeyToolMojo
getMessage, getMessage, getMessage, isSkip, isVerbose, setSkip, setVerbose
-
-
-
-
Field Detail
-
keypass
@Parameter private java.lang.String keypass
Key password. See options.- Since:
- 1.2
-
rfc
@Parameter private boolean rfc
Output in RFC style. See options.- Since:
- 1.2
-
infile
@Parameter private java.io.File infile
input file name. See options.- Since:
- 1.2
-
outfile
@Parameter private java.io.File outfile
output file name. See options.- Since:
- 1.2
-
sigalg
@Parameter private java.lang.String sigalg
Signature algorithm name. See options.- Since:
- 1.2
-
dname
@Parameter private java.lang.String dname
Distinguished name. See options.- Since:
- 1.2
-
startdate
@Parameter private java.lang.String startdate
Certificate validity start date/time. See options.- Since:
- 1.2
-
ext
@Parameter private java.lang.String ext
X.509 extension. See options.- Since:
- 1.2
-
validity
@Parameter private java.lang.String validity
Validity number of days. See options.- Since:
- 1.2
-
-
Method Detail
-
createKeytoolRequest
protected KeyToolGenerateCertificateRequest createKeytoolRequest()
To prepare the incoming request, says fill it with mojo parameters.- Overrides:
createKeytoolRequest
in classAbstractKeyToolRequestWithKeyStoreAndAliasParametersMojo<KeyToolGenerateCertificateRequest>
- Returns:
- the created keytool request
- See Also:
KeyToolRequest
-
getCommandlineInfo
protected java.lang.String getCommandlineInfo(org.apache.maven.shared.utils.cli.Commandline commandLine)
Gets a string representation of aCommandline
.This method creates the string representation by calling
commandLine.toString()
by default.- Overrides:
getCommandlineInfo
in classAbstractKeyToolRequestWithKeyStoreParametersMojo<KeyToolGenerateCertificateRequest>
- Parameters:
commandLine
- TheCommandline
to get a string representation of (can not be null).- Returns:
- The string representation of
commandLine
.
-
-