Package org.codehaus.mojo.keytool
Class ImportCertificateMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="importCertificate", requiresProject=true) public class ImportCertificateMojo extends AbstractKeyToolRequestWithKeyStoreAndAliasParametersMojo<KeyToolImportCertificateRequest>
To import a certificate into a keystore. Implemented as a wrapper around the SDKkeytool -import
(jdk 1.5) orkeytool -importcert
(jdk 1.6) command. See keystore documentation. Since version 1.2, this mojo replace the mojo import.- Since:
- 1.2
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
file
Input file name.private java.lang.String
keypass
Key password.private boolean
noprompt
Do not prompt.private boolean
skipIfExist
If value istrue
, then will do nothing if keystore already exists.private boolean
trustcacerts
Trust certificates from cacerts.
-
Constructor Summary
Constructors Constructor Description ImportCertificateMojo()
Default contructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected KeyToolImportCertificateRequest
createKeytoolRequest()
To prepare the incoming request, says fill it with mojo parameters.void
execute()
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
-
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
-
file
@Parameter private java.lang.String file
Input file name. See options.- Since:
- 1.2
-
noprompt
@Parameter private boolean noprompt
Do not prompt. See options.- Since:
- 1.2
-
trustcacerts
@Parameter private boolean trustcacerts
Trust certificates from cacerts. See options.- Since:
- 1.2
-
skipIfExist
@Parameter private boolean skipIfExist
If value istrue
, then will do nothing if keystore already exists.- Since:
- 1.3
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException
Description copied from class:AbstractKeyToolRequestMojo
- Specified by:
execute
in interfaceorg.apache.maven.plugin.Mojo
- Overrides:
execute
in classAbstractKeyToolRequestMojo<KeyToolImportCertificateRequest>
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
createKeytoolRequest
protected KeyToolImportCertificateRequest createKeytoolRequest()
To prepare the incoming request, says fill it with mojo parameters.- Overrides:
createKeytoolRequest
in classAbstractKeyToolRequestWithKeyStoreAndAliasParametersMojo<KeyToolImportCertificateRequest>
- 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<KeyToolImportCertificateRequest>
- Parameters:
commandLine
- TheCommandline
to get a string representation of (can not be null).- Returns:
- The string representation of
commandLine
.
-
-