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 SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionCreate a detached signature file for the provided file.protected abstract voidgenerateSignatureForFile(File file, File signature) Generate the detached signature file for the provided file.abstract StringShould return some identification about the used key for logging purposes.org.apache.maven.plugin.logging.LoggetLog()voidprepare()Must be invoked BEFORE signing!voidvoidsetBaseDirectory(File out) voidsetBuildDirectory(File out) voidsetDefaultKeyring(boolean enabled) voidsetHomeDirectory(File homeDirectory) voidsetInteractive(boolean b) voidsetKeyName(String s) voidsetLockMode(String lockMode) voidsetLog(org.apache.maven.plugin.logging.Log log) voidsetOutputDirectory(File out) voidvoidsetPublicKeyring(String path) voidsetSecretKeyring(String path) voidsetTerminatePassphrase(boolean b) voidsetUseAgent(boolean b) abstract String
- 
Field Details- 
SIGNATURE_EXTENSION- See Also:
 
- 
useAgentprotected boolean useAgent
- 
isInteractiveprotected boolean isInteractive
- 
defaultKeyringprotected boolean defaultKeyring
- 
keyname
- 
passphrase
- 
terminatePassphraseprotected boolean terminatePassphrase
- 
homeDir
- 
secretKeyring
- 
publicKeyring
- 
lockMode
- 
args
 
- 
- 
Constructor Details- 
AbstractGpgSignerpublic AbstractGpgSigner()
 
- 
- 
Method Details- 
getLogpublic org.apache.maven.plugin.logging.Log getLog()
- 
setArgs
- 
setInteractivepublic void setInteractive(boolean b) 
- 
setLockMode
- 
setUseAgentpublic void setUseAgent(boolean b) 
- 
setDefaultKeyringpublic void setDefaultKeyring(boolean enabled) 
- 
setKeyName
- 
setLogpublic void setLog(org.apache.maven.plugin.logging.Log log) 
- 
setPassPhrase
- 
setTerminatePassphrasepublic void setTerminatePassphrase(boolean b) 
- 
setOutputDirectory
- 
setBuildDirectory
- 
setBaseDirectory
- 
setHomeDirectory
- 
setSecretKeyring
- 
setPublicKeyring
- 
signerName
- 
preparepublic void prepare() throws org.apache.maven.plugin.MojoFailureExceptionMust be invoked BEFORE signing!- Throws:
- org.apache.maven.plugin.MojoFailureException
- Since:
- 3.2.0
 
- 
getKeyInfoShould return some identification about the used key for logging purposes. Can be invoked only AFTERprepare()was invoked.- Since:
- 3.2.2
 
- 
generateSignatureForArtifactpublic 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
 
- 
generateSignatureForFileprotected 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 sign
- signature- The file in which the generate signature will be put
- Throws:
- org.apache.maven.plugin.MojoExecutionException- if signature generation fails
 
 
-