我正在尝试将我的学校项目添加到 Maven 存储库。我正在关注本教程:https ://blog.sonatype.com/2010/01/how-to-generate-pgp-signatures-with-maven/ 。我已经成功生成了一个密钥和密码,并且我已经将该链接中的插件添加到了我的 pom 文件中。
当我运行命令mvn clean deploy -Dgpg.passphrase=mypassphrase
时,它说
[ERROR] Unknown lifecycle phase ".passphrase=...". You must specify a valid lifecycle phase or a goal in
the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>.
Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-
resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources,
generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-
package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy,
pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
如果我只运行mvn clean deploy
它说
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (sign-artifacts) on
project game-engine: Unable to execute gpg command: Error while executing process.
Cannot run program "gpg.exe": CreateProcess error=2, The system cannot find the file specified -> [Help 1]
我试图谷歌这个,但我无法找到完全相同的问题。我在 Windows 10 上运行这个项目。