gpg:sign-and-deploy-file

Full name:

org.apache.maven.plugins:maven-gpg-plugin:1.2:sign-and-deploy-file

Description:

Signs artifacts and installs the artifact in the remote repository.

Attributes:

  • The goal is thread-safe and supports parallel builds.
  • Since version: 1.0-beta-4.

Required Parameters

Name Type Since Description
file File 1.0-beta-4 File to be deployed.
repositoryId String 1.0-beta-4 Server Id to map on the <id> under <server> section of settings.xml. In most cases, this parameter will be required for authentication.
Default value is: remote-repository.
url String 1.0-beta-4 URL where the artifact will be deployed.
ie ( file:///C:/m2-repo or scp://host.com/path/to/repo )

Optional Parameters

Name Type Since Description
artifactId String 1.0-beta-4 ArtifactId of the artifact to be deployed. Retrieved from POM file if specified.
ascDirectory File 1.0-beta-4 The directory where to store signature files.
classifier String 1.0-beta-4 Add classifier to the artifact
defaultKeyring boolean 1.2 Whether to add the default keyrings from gpg's home directory to the list of used keyrings.
Default value is: true.
description String 1.0-beta-4 Description passed to a generated POM file (in case of generatePom=true).
executable String 1.1 The path to the GnuPG executable to use for artifact signing. Defaults to either "gpg" or "gpg.exe" depending on the operating system.
generatePom boolean 1.0-beta-4 Upload a POM for this artifact. Will generate a default POM if none is supplied with the pomFile argument.
Default value is: true.
groupId String 1.0-beta-4 GroupId of the artifact to be deployed. Retrieved from POM file if specified.
homedir File 1.0 The directory from which gpg will load keyrings. If not specified, gpg will use the value configured for its installation, e.g. ~/.gnupg or %APPDATA%/gnupg.
keyname String 1.0-beta-4 The "name" of the key to sign with. Passed to gpg as --local-user.
packaging String 1.0-beta-4 Type of the artifact to be deployed. Retrieved from POM file if specified.
passphrase String 1.0-beta-4 The passphrase to use when signing.
pomFile File 1.0-beta-4 Location of an existing POM file to be deployed alongside the main artifact, given by the ${file} parameter.
publicKeyring String 1.2 The path to a public keyring to add to the list of keyrings. By default, only the 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.
repositoryLayout String 1.0-beta-4 The type of remote repository layout to deploy to. Try legacy for a Maven 1.x-style repository layout.
Default value is: default.
secretKeyring String 1.2 The path to a secret keyring to add to the list of keyrings. By default, only the 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.
uniqueVersion boolean 1.0-beta-4 Whether to deploy snapshots with a unique version or not.
Default value is: true.
useAgent boolean 1.0-beta-4 Passes --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.
Default value is: false.
version String 1.0-beta-4 Version of the artifact to be deployed. Retrieved from POM file if specified.

Parameter Details

artifactId:

ArtifactId of the artifact to be deployed. Retrieved from POM file if specified.
  • Type: java.lang.String
  • Since: 1.0-beta-4
  • Required: No
  • Expression: ${artifactId}

ascDirectory:

The directory where to store signature files.
  • Type: java.io.File
  • Since: 1.0-beta-4
  • Required: No
  • Expression: ${gpg.ascDirectory}

classifier:

Add classifier to the artifact
  • Type: java.lang.String
  • Since: 1.0-beta-4
  • Required: No
  • Expression: ${classifier}

defaultKeyring:

Whether to add the default keyrings from gpg's home directory to the list of used keyrings.
  • Type: boolean
  • Since: 1.2
  • Required: No
  • Expression: ${gpg.defaultKeyring}
  • Default: true

description:

Description passed to a generated POM file (in case of generatePom=true).
  • Type: java.lang.String
  • Since: 1.0-beta-4
  • Required: No
  • Expression: ${generatePom.description}

executable:

The path to the GnuPG executable to use for artifact signing. Defaults to either "gpg" or "gpg.exe" depending on the operating system.
  • Type: java.lang.String
  • Since: 1.1
  • Required: No
  • Expression: ${gpg.executable}

file:

File to be deployed.
  • Type: java.io.File
  • Since: 1.0-beta-4
  • Required: Yes
  • Expression: ${file}

generatePom:

Upload a POM for this artifact. Will generate a default POM if none is supplied with the pomFile argument.
  • Type: boolean
  • Since: 1.0-beta-4
  • Required: No
  • Expression: ${generatePom}
  • Default: true

groupId:

GroupId of the artifact to be deployed. Retrieved from POM file if specified.
  • Type: java.lang.String
  • Since: 1.0-beta-4
  • Required: No
  • Expression: ${groupId}

homedir:

The directory from which gpg will load keyrings. If not specified, gpg will use the value configured for its installation, e.g. ~/.gnupg or %APPDATA%/gnupg.
  • Type: java.io.File
  • Since: 1.0
  • Required: No
  • Expression: ${gpg.homedir}

keyname:

The "name" of the key to sign with. Passed to gpg as --local-user.
  • Type: java.lang.String
  • Since: 1.0-beta-4
  • Required: No
  • Expression: ${gpg.keyname}

packaging:

Type of the artifact to be deployed. Retrieved from POM file if specified.
  • Type: java.lang.String
  • Since: 1.0-beta-4
  • Required: No
  • Expression: ${packaging}

passphrase:

The passphrase to use when signing.
  • Type: java.lang.String
  • Since: 1.0-beta-4
  • Required: No
  • Expression: ${gpg.passphrase}

pomFile:

Location of an existing POM file to be deployed alongside the main artifact, given by the ${file} parameter.
  • Type: java.io.File
  • Since: 1.0-beta-4
  • Required: No
  • Expression: ${pomFile}

publicKeyring:

The path to a public keyring to add to the list of keyrings. By default, only the 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.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No
  • Expression: ${gpg.publicKeyring}

repositoryId:

Server Id to map on the <id> under <server> section of settings.xml. In most cases, this parameter will be required for authentication.
  • Type: java.lang.String
  • Since: 1.0-beta-4
  • Required: Yes
  • Expression: ${repositoryId}
  • Default: remote-repository

repositoryLayout:

The type of remote repository layout to deploy to. Try legacy for a Maven 1.x-style repository layout.
  • Type: java.lang.String
  • Since: 1.0-beta-4
  • Required: No
  • Expression: ${repositoryLayout}
  • Default: default

secretKeyring:

The path to a secret keyring to add to the list of keyrings. By default, only the 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.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No
  • Expression: ${gpg.secretKeyring}

uniqueVersion:

Whether to deploy snapshots with a unique version or not.
  • Type: boolean
  • Since: 1.0-beta-4
  • Required: No
  • Expression: ${uniqueVersion}
  • Default: true

url:

URL where the artifact will be deployed.
ie ( file:///C:/m2-repo or scp://host.com/path/to/repo )
  • Type: java.lang.String
  • Since: 1.0-beta-4
  • Required: Yes
  • Expression: ${url}

useAgent:

Passes --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.
  • Type: boolean
  • Since: 1.0-beta-4
  • Required: No
  • Expression: ${gpg.useagent}
  • Default: false

version:

Version of the artifact to be deployed. Retrieved from POM file if specified.
  • Type: java.lang.String
  • Since: 1.0-beta-4
  • Required: No
  • Expression: ${version}