Package org.apache.maven.plugins.gpg
Class AbstractGpgSigner
- java.lang.Object
-
- org.apache.maven.plugins.gpg.AbstractGpgSigner
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>argsprotected booleandefaultKeyringprotected FilehomeDirprotected booleanisInteractiveprotected Stringkeynameprotected StringlockModeprotected Stringpassphraseprotected StringpublicKeyringprotected StringsecretKeyringstatic StringSIGNATURE_EXTENSIONprotected booleanuseAgent
-
Constructor Summary
Constructors Constructor Description AbstractGpgSigner()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description FilegenerateSignatureForArtifact(File file)Create a detached signature file for the provided file.protected abstract voidgenerateSignatureForFile(File file, File signature)Generate the detached signature file for the provided file.org.apache.maven.plugin.logging.LoggetLog()StringgetPassphrase(org.apache.maven.project.MavenProject project)voidsetArgs(List<String> args)voidsetBaseDirectory(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)voidsetPassPhrase(String s)voidsetPublicKeyring(String path)voidsetSecretKeyring(String path)voidsetUseAgent(boolean b)
-
-
-
Field Detail
-
SIGNATURE_EXTENSION
public static final String SIGNATURE_EXTENSION
- See Also:
- Constant Field Values
-
useAgent
protected boolean useAgent
-
isInteractive
protected boolean isInteractive
-
defaultKeyring
protected boolean defaultKeyring
-
keyname
protected String keyname
-
passphrase
protected String passphrase
-
homeDir
protected File homeDir
-
secretKeyring
protected String secretKeyring
-
publicKeyring
protected String publicKeyring
-
lockMode
protected String lockMode
-
-
Method Detail
-
getLog
public org.apache.maven.plugin.logging.Log getLog()
-
setInteractive
public void setInteractive(boolean b)
-
setLockMode
public void setLockMode(String lockMode)
-
setUseAgent
public void setUseAgent(boolean b)
-
setDefaultKeyring
public void setDefaultKeyring(boolean enabled)
-
setKeyName
public void setKeyName(String s)
-
setLog
public void setLog(org.apache.maven.plugin.logging.Log log)
-
setPassPhrase
public void setPassPhrase(String s)
-
setOutputDirectory
public void setOutputDirectory(File out)
-
setBuildDirectory
public void setBuildDirectory(File out)
-
setBaseDirectory
public void setBaseDirectory(File out)
-
setHomeDirectory
public void setHomeDirectory(File homeDirectory)
-
setSecretKeyring
public void setSecretKeyring(String path)
-
setPublicKeyring
public void setPublicKeyring(String path)
-
generateSignatureForArtifact
public File generateSignatureForArtifact(File file) throws org.apache.maven.plugin.MojoExecutionException
Create a detached signature file for the provided file.- 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
-
getPassphrase
public String getPassphrase(org.apache.maven.project.MavenProject project) throws IOException
- Throws:
IOException
-
-