public abstract class AbstractGpgMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
private boolean |
defaultKeyring
Whether to add the default keyrings from gpg's home directory to the list of used keyrings.
|
private java.lang.String |
executable
The path to the GnuPG executable to use for artifact signing.
|
private java.util.List<java.lang.String> |
gpgArguments
Sets the arguments to be passed to gpg.
|
private java.io.File |
homedir
The directory from which gpg will load keyrings.
|
private boolean |
interactive |
private java.lang.String |
keyname
The "name" of the key to sign with.
|
private java.lang.String |
lockMode
The lock mode to use when invoking gpg.
|
private java.lang.String |
passphrase
The passphrase to use when signing.
|
private java.lang.String |
passphraseServerId
Server id to lookup the passphrase under Maven settings.
|
private java.lang.String |
publicKeyring
The path to a public keyring to add to the list of keyrings.
|
private java.lang.String |
secretKeyring
The path to a secret keyring to add to the list of keyrings.
|
private org.sonatype.plexus.components.sec.dispatcher.SecDispatcher |
securityDispatcher
Maven Security Dispatcher
|
private org.apache.maven.settings.Settings |
settings
Current user system settings for use in Maven.
|
private boolean |
useAgent
Passes
--use-agent or --no-use-agent to gpg. |
| Constructor and Description |
|---|
AbstractGpgMojo() |
| Modifier and Type | Method and Description |
|---|---|
private void |
loadGpgPassphrase()
Load and decrypt gpg passphrase from Maven settings if not given from plugin configuration
|
(package private) AbstractGpgSigner |
newSigner(org.apache.maven.project.MavenProject project) |
getLog, getPluginContext, setLog, setPluginContext@Parameter(property="gpg.homedir") private java.io.File homedir
~/.gnupg or %APPDATA%/gnupg.@Parameter(property="gpg.passphrase") private java.lang.String passphrase
@Parameter(property="gpg.passphraseServerId",
defaultValue="gpg.passphrase")
private java.lang.String passphraseServerId
@Parameter(property="gpg.keyname") private java.lang.String keyname
--local-user.@Parameter(property="gpg.useagent",
defaultValue="true")
private boolean useAgent
--use-agent or --no-use-agent to gpg. If using an agent, the passphrase is
optional as the agent will provide it. For gpg2, specify true as --no-use-agent was removed in gpg2 and doesn't
ask for a passphrase anymore.@Parameter(defaultValue="${settings.interactiveMode}",
readonly=true)
private boolean interactive
@Parameter(property="gpg.executable") private java.lang.String executable
@Parameter(property="gpg.defaultKeyring",
defaultValue="true")
private boolean defaultKeyring
@Parameter(property="gpg.secretKeyring") private java.lang.String secretKeyring
secring.gpg from gpg's
home directory is considered. Use this option (in combination with publicKeyring and
defaultKeyring if required) to use a different secret key. Note: Relative paths are resolved
against gpg's home directory, not the project base directory.@Parameter(property="gpg.publicKeyring") private java.lang.String publicKeyring
pubring.gpg from gpg's
home directory is considered. Use this option (and defaultKeyring if required) to use a different public
key. Note: Relative paths are resolved against gpg's home directory, not the project base directory.@Parameter(property="gpg.lockMode") private java.lang.String lockMode
once,
multiple and never. The lock mode gets translated into the corresponding --lock-___
command line argument. Improper usage of this option may lead to data and key corruption.@Parameter private java.util.List<java.lang.String> gpgArguments
<gpgArguments> <arg>--no-random-seed-file</arg> <arg>--no-permission-warning</arg> </gpgArguments>
@Parameter(defaultValue="${settings}",
readonly=true)
private org.apache.maven.settings.Settings settings
@Component(hint="mng-4384") private org.sonatype.plexus.components.sec.dispatcher.SecDispatcher securityDispatcher
AbstractGpgSigner newSigner(org.apache.maven.project.MavenProject project) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprivate void loadGpgPassphrase()
throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException