gpg:签名和部署文件

全名

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

说明

签署工件并将工件安装在远程存储库中。

属性

  • 自版本:1.0-beta-4

必需参数

姓名 类型 自从 描述
<文件> 文件 1.0-beta-4 要部署的文件。
用户属性是文件
<repositoryId> 细绳 1.0-beta-4 服务器 ID 映射到settings.xml的 <server> 部分下的 <id> 上 。在大多数情况下,此参数将是身份验证所必需的。
默认值为远程存储库
用户属性是repositoryId
<网址> 细绳 1.0-beta-4 将部署工件的 URL。
即(file:///C:/m2-repo 或 scp://host.com/path/to/repo)
用户属性是url

可选参数

姓名 类型 自从 描述
<artifactId> 细绳 1.0-beta-4 要部署的工件的 ArtifactId。如果指定,则从 POM 文件中检索。
用户属性是artifactId
<asc目录> 文件 1.0-beta-4 存储签名文件的目录。
用户属性是gpg.ascDirectory
<分类器> 细绳 1.0-beta-4 将分类器添加到工件
用户属性是分类器
<分类器> 细绳 1.0-beta-4 一个逗号分隔的分类器列表,用于部署每个额外的辅助工件。如果filestypes中的条目数不匹配,则会引发错误。
用户属性是分类器
<默认密钥环> 布尔值 1.2 是否将 gpg 主目录中的默认密钥环添加到已使用的密钥环列表中。
默认值为true
用户属性是gpg.defaultKeyring
<说明> 细绳 1.0-beta-4 传递给生成的 POM 文件的描述(在 generatePom=true 的情况下)。
用户属性是generatePom.description
<可执行文件> 细绳 1.1 用于工件签名的 GnuPG 可执行文件的路径。默认为“gpg”或“gpg.exe”,具体取决于操作系统。
用户属性是gpg.executable
<文件> 细绳 1.0-beta-4 每个要部署的额外辅助工件的逗号分隔文件列表。如果typesclassifiers中的条目数不匹配,则会引发错误。
用户属性是文件
<生成Pom> 布尔值 1.0-beta-4 上传此工件的 POM。如果没有提供 pomFile 参数,将生成默认 POM。
默认值为true
用户属性是generatePom
<gpg参数> 列表 1.5 设置要传递给 gpg 的参数。例子:

<gpgArguments>
  <arg>--no-random-seed-file</arg>
  <arg>--no-permission-warning</arg>
</gpgArguments>

<组ID> 细绳 1.0-beta-4 要部署的工件的 GroupId。如果指定,则从 POM 文件中检索。
用户属性是groupId
<主目录> 文件 1.0 gpg 将从中加载密钥环的目录。如果未指定,gpg 将使用为其安装配置的值,例如 ~/.gnupg%APPDATA%/gnupg
用户属性是gpg.homedir
<javadoc> 文件 1.3 工件的捆绑 API 文档。
用户属性是javadoc
<键名> 细绳 1.0-beta-4 要签名的密钥的“名称”。作为--local-user传递给 gpg 。
用户属性是gpg.keyname
<锁定模式> 细绳 1.5 调用 gpg 时使用的锁定模式。默认情况下不会指定锁定模式。有效值为oncemultiplenever。锁定模式被翻译成相应的--lock-___命令行参数。此选项使用不当可能会导致数据和密钥损坏。
用户属性是gpg.lockMode
<包装> 细绳 1.0-beta-4 要部署的工件的类型。如果指定,则从 POM 文件中检索。如果未通过命令行或 POM 指定,则默认为文件扩展名。
用户属性是包装
<密码> 细绳 1.0-beta-4 签名时使用的密码。如果未给出,请使用“passphraseServerKey”配置中的服务器 ID 在 Maven 设置下查找值。
用户属性是gpg.passphrase
<passphraseServerId> 细绳 1.6 用于在 Maven 设置下查找密码的服务器 ID。
默认值为gpg.passphrase
用户属性是gpg.passphraseServerId
<pom文件> 文件 1.0-beta-4 与主要工件一起部署的现有 POM 文件的位置,由 ${file} 参数给出。
用户属性是pomFile
<公共密钥环> 细绳 1.2 要添加到密钥环列表的公共密钥环的路径。默认情况下,只考虑 gpg 主目录中的pubring.gpg。使用此选项( 如果需要,还可以使用defaultKeyring)来使用不同的公钥。注意:相对路径是针对 gpg 的主目录而不是项目基目录解析的。
用户属性是gpg.publicKeyring
<存储库布局> 细绳 1.0-beta-4 要部署到的远程存储库布局的类型。尝试 使用 Maven 1.x 风格的存储库布局的legacy
默认值为默认值
用户属性是repositoryLayout
<retryFailedDeploymentCount> 整数 1.3 用于控制失败部署在放弃和失败之前重试多少次的参数。如果指定了 1-10 范围之外的值,它将被拉到 1-10 范围内的最接近的值。
默认值为1
用户属性是retryFailedDeploymentCount
<密钥环> 细绳 1.2

要添加到密钥环列表的密钥环的路径。默认情况下,只考虑 gpg 主目录中的secring.gpg。使用此选项(如果需要,与 publicKeyringdefaultKeyring结合使用)使用不同的密钥。注意:相对路径是针对 gpg 的主目录而不是项目基目录解析的。

注意:从 gpg 2.1 开始,这是一个过时的选项并被忽略。所有密钥都存储在 GnuPG 主目录下的“private-keys-v1.d”目录中。
用户属性是gpg.secretKeyring
<来源> 文件 1.3 工件的捆绑源。
用户属性是sources
<类型> 细绳 1.0-beta-4 每个要部署的额外辅助工件的类型的逗号分隔列表。如果文件分类器中的条目数不匹配,则会引发错误。
用户属性是types
<更新发布信息> 布尔值 1.3 用于更新元数据以使工件成为发布的参数。
默认值为false
用户属性是updateReleaseInfo
<使用代理> 布尔值 1.0-beta-4 将--use-agent--no-use-agent传递给 gpg。如果使用代理,则密码是可选的,因为代理将提供它。对于 gpg2,指定 true 为 --no-use-agent 已在 gpg2 中删除,并且不再要求输入密码。
默认值为true
用户属性是gpg.useagent
<版本> 细绳 1.0-beta-4 要部署的工件的版本。如果指定,则从 POM 文件中检索。
用户属性是版本

参数详情

<artifactId>

要部署的工件的 ArtifactId。如果指定,则从 POM 文件中检索。
  • 类型java.lang.String
  • 1.0-beta-4
  • 要求
  • 用户属性artifactId

<asc目录>

存储签名文件的目录。
  • 类型java.io.File
  • 1.0-beta-4
  • 要求
  • 用户属性gpg.ascDirectory

<分类器>

将分类器添加到工件
  • 类型java.lang.String
  • 1.0-beta-4
  • 要求
  • 用户属性分类器

<分类器>

一个逗号分隔的分类器列表,用于部署每个额外的辅助工件。如果filestypes中的条目数不匹配,则会引发错误。
  • 类型java.lang.String
  • 1.0-beta-4
  • 要求
  • 用户属性分类器

<默认密钥环>

是否将 gpg 主目录中的默认密钥环添加到已使用的密钥环列表中。
  • 类型布尔值
  • : 1.2
  • 要求
  • 用户属性gpg.defaultKeyring
  • 默认值

<说明>

传递给生成的 POM 文件的描述(在 generatePom=true 的情况下)。
  • 类型java.lang.String
  • 1.0-beta-4
  • 要求
  • 用户属性generatePom.description

<可执行文件>

用于工件签名的 GnuPG 可执行文件的路径。默认为“gpg”或“gpg.exe”,具体取决于操作系统。
  • 类型java.lang.String
  • : 1.1
  • 要求
  • 用户属性gpg.executable

<文件>

要部署的文件。
  • 类型java.io.File
  • 1.0-beta-4
  • 要求
  • 用户属性文件

<文件>

A comma separated list of files for each of the extra side artifacts to deploy. If there is a mis-match in the number of entries in types or classifiers, then an error will be raised.
  • Type: java.lang.String
  • Since: 1.0-beta-4
  • Required: No
  • User Property: files

<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
  • User Property: generatePom
  • Default: true

<gpgArguments>

Sets the arguments to be passed to gpg. Example:
<gpgArguments>
  <arg>--no-random-seed-file</arg>
  <arg>--no-permission-warning</arg>
</gpgArguments>
  • Type: java.util.List
  • Since: 1.5
  • Required: No

<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
  • User Property: 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
  • User Property: gpg.homedir

<javadoc>

The bundled API docs for the artifact.
  • Type: java.io.File
  • Since: 1.3
  • Required: No
  • User Property: javadoc

<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
  • User Property: gpg.keyname

<lockMode>

The lock mode to use when invoking gpg. By default no lock mode will be specified. Valid values are 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.
  • Type: java.lang.String
  • Since: 1.5
  • Required: No
  • User Property: gpg.lockMode

<packaging>

Type of the artifact to be deployed. Retrieved from POM file if specified. Defaults to file extension if not specified via command line or POM.
  • Type: java.lang.String
  • Since: 1.0-beta-4
  • Required: No
  • User Property: packaging

<passphrase>

The passphrase to use when signing. If not given, look up the value under Maven settings using server id at 'passphraseServerKey' configuration.
  • Type: java.lang.String
  • Since: 1.0-beta-4
  • Required: No
  • User Property: gpg.passphrase

<passphraseServerId>

Server id to lookup the passphrase under Maven settings.
  • Type: java.lang.String
  • Since: 1.6
  • Required: No
  • User Property: gpg.passphraseServerId
  • Default: 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
  • User Property: 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
  • User Property: 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
  • User Property: 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
  • User Property: repositoryLayout
  • Default: default

<retryFailedDeploymentCount>

Parameter used to control how many times a failed deployment will be retried before giving up and failing. If a value outside the range 1-10 is specified it will be pulled to the nearest value within the range 1-10.
  • Type: int
  • Since: 1.3
  • Required: No
  • User Property: retryFailedDeploymentCount
  • Default: 1

<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.

NOTE: As of gpg 2.1 this is an obsolete option and ignored. All secret keys are stored in the 'private-keys-v1.d' directory below the GnuPG home directory.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No
  • User Property: gpg.secretKeyring

<sources>

The bundled sources for the artifact.
  • Type: java.io.File
  • Since: 1.3
  • Required: No
  • User Property: sources

<types>

A comma separated list of types for each of the extra side artifacts to deploy. If there is a mis-match in the number of entries in files or classifiers, then an error will be raised.
  • Type: java.lang.String
  • Since: 1.0-beta-4
  • Required: No
  • User Property: types

<updateReleaseInfo>

Parameter used to update the metadata to make the artifact as release.
  • Type: boolean
  • Since: 1.3
  • Required: No
  • User Property: updateReleaseInfo
  • Default: false

<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
  • User Property: 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
  • User Property: gpg.useagent
  • 默认值

<版本>

要部署的工件的版本。如果指定,则从 POM 文件中检索。
  • 类型java.lang.String
  • 1.0-beta-4
  • 要求
  • 用户属性版本