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>
args
protected boolean
defaultKeyring
protected File
homeDir
protected boolean
isInteractive
protected String
keyname
protected String
lockMode
protected String
passphrase
protected String
publicKeyring
protected String
secretKeyring
static String
SIGNATURE_EXTENSION
protected boolean
useAgent
-
Constructor Summary
Constructors Constructor Description AbstractGpgSigner()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description File
generateSignatureForArtifact(File file)
Create 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.org.apache.maven.plugin.logging.Log
getLog()
String
getPassphrase(org.apache.maven.project.MavenProject project)
void
setArgs(List<String> args)
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
setPassPhrase(String s)
void
setPublicKeyring(String path)
void
setSecretKeyring(String path)
void
setUseAgent(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
-
-