Package org.codehaus.mojo.keytool
Class ImportKeystoreMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.codehaus.mojo.keytool.AbstractKeyToolMojo
-
- org.codehaus.mojo.keytool.AbstractKeyToolRequestMojo<KeyToolImportKeystoreRequest>
-
- org.codehaus.mojo.keytool.ImportKeystoreMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="importKeystore", requiresProject=true) public class ImportKeystoreMojo extends AbstractKeyToolRequestMojo<KeyToolImportKeystoreRequest>
To import all entries of a keystore to another keystore. Implemented as a wrapper around the SDKkeytool -importkeystore
command. Note This operation was not implemented by the keytool before jdk 1.6. See keystore documentation.- Since:
- 1.2
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
destalias
Destination alias.private java.lang.String
destkeypass
Destination key password.private java.lang.String
destkeystore
Destination keystore name.private java.lang.String
destprovidername
Destination keystore provider name.private java.lang.String
deststorepass
Destination keystore password.private java.lang.String
deststoretype
Destination keystore type.private boolean
noprompt
Do not prompt.private java.lang.String
providerarg
Provider argument.private java.lang.String
providerclass
Provider class name.private java.lang.String
providerpath
Provider classpath.private boolean
skipIfExist
If value istrue
, then will do nothing if keystore already exists.private java.lang.String
srcalias
Source alias.private java.lang.String
srckeypass
Source key password.private java.lang.String
srckeystore
Source keystore name.private boolean
srcprotected
Source keystore password protected.private java.lang.String
srcprovidername
Source keystore provider name.private java.lang.String
srcstorepass
Source keystore password.private java.lang.String
srcstoretype
Source keystore type.
-
Constructor Summary
Constructors Constructor Description ImportKeystoreMojo()
Default contructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected KeyToolImportKeystoreRequest
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.AbstractKeyToolRequestMojo
consumeResult
-
Methods inherited from class org.codehaus.mojo.keytool.AbstractKeyToolMojo
getMessage, getMessage, getMessage, isSkip, isVerbose, setSkip, setVerbose
-
-
-
-
Field Detail
-
srckeystore
@Parameter private java.lang.String srckeystore
Source keystore name. See options.- Since:
- 1.2
-
destkeystore
@Parameter private java.lang.String destkeystore
Destination keystore name. See options.- Since:
- 1.2
-
srcstoretype
@Parameter private java.lang.String srcstoretype
Source keystore type. See options.- Since:
- 1.2
-
deststoretype
@Parameter private java.lang.String deststoretype
Destination keystore type. See options.- Since:
- 1.2
-
srcstorepass
@Parameter private java.lang.String srcstorepass
Source keystore password. See options.- Since:
- 1.2
-
deststorepass
@Parameter private java.lang.String deststorepass
Destination keystore password. See options.- Since:
- 1.2
-
srcprotected
@Parameter private boolean srcprotected
Source keystore password protected. See options.- Since:
- 1.2
-
srcprovidername
@Parameter private java.lang.String srcprovidername
Source keystore provider name. See options.- Since:
- 1.2
-
destprovidername
@Parameter private java.lang.String destprovidername
Destination keystore provider name. See options.- Since:
- 1.2
-
srcalias
@Parameter private java.lang.String srcalias
Source alias. See options.- Since:
- 1.2
-
destalias
@Parameter private java.lang.String destalias
Destination alias. See options.- Since:
- 1.2
-
srckeypass
@Parameter private java.lang.String srckeypass
Source key password. See options.- Since:
- 1.2
-
destkeypass
@Parameter private java.lang.String destkeypass
Destination key password. See options.- Since:
- 1.2
-
noprompt
@Parameter private boolean noprompt
Do not prompt. See options.- Since:
- 1.2
-
providerclass
@Parameter private java.lang.String providerclass
Provider class name. See options.- Since:
- 1.2
-
providerarg
@Parameter private java.lang.String providerarg
Provider argument. See options.- Since:
- 1.2
-
providerpath
@Parameter private java.lang.String providerpath
Provider classpath. 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<KeyToolImportKeystoreRequest>
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
createKeytoolRequest
protected KeyToolImportKeystoreRequest createKeytoolRequest()
To prepare the incoming request, says fill it with mojo parameters.- Overrides:
createKeytoolRequest
in classAbstractKeyToolRequestMojo<KeyToolImportKeystoreRequest>
- 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 classAbstractKeyToolRequestMojo<KeyToolImportKeystoreRequest>
- Parameters:
commandLine
- TheCommandline
to get a string representation of (can not be null).- Returns:
- The string representation of
commandLine
.
-
-