gpg:sign-and-deploy-file

Signs artifacts and installs the artifact in the remote repository.

Mojo Attributes:

  • Since version: 1.0-beta-4

Required Parameters

Name Type Description
file File File to be deployed.
repositoryId String 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.
repositoryLayout String The type of remote repository layout to deploy to. Try legacy for a Maven 1.x-style repository layout. Default value is default.
url String URL where the artifact will be deployed.

ie ( file://C:\m2-repo or scp://host.com/path/to/repo )
useAgent boolean Passes --use-agent or --no-use-agent to gpg. If using an agent, the password is optional as the agent will provide it. Default value is false.

Optional Parameters

Name Type Description
artifactFactory ArtifactFactory Component used to create an artifact
artifactHandlerManager ArtifactHandlerManager Maven ArtifactHandlerManager
artifactId String ArtifactId of the artifact to be deployed. Retrieved from POM file if specified.
ascDirectory File The directory where to store signature files.
classifier String Add classifier to the artifact
description String Description passed to a generated POM file (in case of generatePom=true)
generatePom boolean 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 GroupId of the artifact to be deployed. Retrieved from POM file if specified.
keyname String The "name" of the key to sign with. Passed to gpg as --local-user.
packaging String Type of the artifact to be deployed. Retrieved from POM file if specified.
passphrase String The passphrase to use when signing.
pomFile File Location of an existing POM file to be deployed alongside the main artifact, given by the ${file} parameter.
repositoryFactory ArtifactRepositoryFactory Component used to create a repository
repositoryLayouts Map Map that contains the layouts
uniqueVersion boolean Whether to deploy snapshots with a unique version or not. Default value is true.
version String Version of the artifact to be deployed. Retrieved from POM file if specified.

Parameter Details

artifactFactory

Component used to create an artifact

  • Type: org.apache.maven.artifact.factory.ArtifactFactory
  • Required: No

artifactHandlerManager Maven ArtifactHandlerManager
  • Type: org.apache.maven.artifact.handler.manager.ArtifactHandlerManager
  • Required: No

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

ascDirectory The directory where to store signature files.
  • Type: java.io.File
  • Required: No
  • Expression: ${gpg.asc.directory}

classifier Add classifier to the artifact
  • Type: java.lang.String
  • Required: No
  • Expression: ${classifier}

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

file File to be deployed.
  • Type: java.io.File
  • 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
  • Required: No
  • Expression: ${generatePom}
  • Default: true

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

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

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

passphrase The passphrase to use when signing.
  • Type: java.lang.String
  • 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
  • Required: No
  • Expression: ${pomFile}

repositoryFactory Component used to create a repository
  • Type: org.apache.maven.artifact.repository.ArtifactRepositoryFactory
  • Required: No

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
  • 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
  • Required: Yes
  • Expression: ${repositoryLayout}
  • Default: default

repositoryLayouts Map that contains the layouts
  • Type: java.util.Map
  • Required: No

uniqueVersion Whether to deploy snapshots with a unique version or not.
  • Type: boolean
  • 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
  • Required: Yes
  • Expression: ${url}

useAgent Passes --use-agent or --no-use-agent to gpg. If using an agent, the password is optional as the agent will provide it.
  • Type: boolean
  • Required: Yes
  • Expression: ${gpg.useagent}
  • Default: false

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