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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier 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:
-
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
-