Package org.apache.maven.plugins.gpg
Class AbstractGpgSigner
java.lang.Object
org.apache.maven.plugins.gpg.AbstractGpgSigner
A base class for all classes that implements signing of files.
- Since:
- 1.5
- Author:
- Dennis Lundberg
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreate a detached signature file for the provided file.protected abstract void
generateSignatureForFile
(File file, File signature) Generate the detached signature file for the provided file.abstract String
Should return some identification about the used key for logging purposes.org.apache.maven.plugin.logging.Log
getLog()
void
prepare()
Must be invoked BEFORE signing!void
void
setBaseDirectory
(File out) void
setBuildDirectory
(File out) void
setDefaultKeyring
(boolean enabled) void
setHomeDirectory
(File homeDirectory) void
setInteractive
(boolean b) void
setKeyName
(String s) void
setLockMode
(String lockMode) void
setLog
(org.apache.maven.plugin.logging.Log log) void
setOutputDirectory
(File out) void
void
setPublicKeyring
(String path) void
setSecretKeyring
(String path) void
setTerminatePassphrase
(boolean b) void
setUseAgent
(boolean b) abstract String
-
Field Details
-
SIGNATURE_EXTENSION
- See Also:
-
useAgent
protected boolean useAgent -
isInteractive
protected boolean isInteractive -
defaultKeyring
protected boolean defaultKeyring -
keyname
-
passphrase
-
terminatePassphrase
protected boolean terminatePassphrase -
homeDir
-
secretKeyring
-
publicKeyring
-
lockMode
-
args
-
-
Constructor Details
-
AbstractGpgSigner
public AbstractGpgSigner()
-
-
Method Details
-
getLog
public org.apache.maven.plugin.logging.Log getLog() -
setArgs
-
setInteractive
public void setInteractive(boolean b) -
setLockMode
-
setUseAgent
public void setUseAgent(boolean b) -
setDefaultKeyring
public void setDefaultKeyring(boolean enabled) -
setKeyName
-
setLog
public void setLog(org.apache.maven.plugin.logging.Log log) -
setPassPhrase
-
setTerminatePassphrase
public void setTerminatePassphrase(boolean b) -
setOutputDirectory
-
setBuildDirectory
-
setBaseDirectory
-
setHomeDirectory
-
setSecretKeyring
-
setPublicKeyring
-
signerName
-
prepare
public void prepare() throws org.apache.maven.plugin.MojoFailureExceptionMust be invoked BEFORE signing!- Throws:
org.apache.maven.plugin.MojoFailureException
- Since:
- 3.2.0
-
getKeyInfo
Should return some identification about the used key for logging purposes. Can be invoked only AFTERprepare()
was invoked.- Since:
- 3.2.2
-
generateSignatureForArtifact
public File generateSignatureForArtifact(File file) throws org.apache.maven.plugin.MojoExecutionException Create a detached signature file for the provided file. Can be invoked only AFTERprepare()
was invoked.- Parameters:
file
- The file to sign- Returns:
- A reference to the generated signature file
- Throws:
org.apache.maven.plugin.MojoExecutionException
- if signature generation fails
-
generateSignatureForFile
protected abstract void generateSignatureForFile(File file, File signature) throws org.apache.maven.plugin.MojoExecutionException Generate the detached signature file for the provided file.- Parameters:
file
- The file to signsignature
- The file in which the generate signature will be put- Throws:
org.apache.maven.plugin.MojoExecutionException
- if signature generation fails
-