maven发布:执行失败

发布于 2024-08-23 11:32:30 字数 1211 浏览 7 评论 0原文

我试图了解 maven-release-plugin (版本 2.0,CVS)。 发布准备效果很好。 但我不明白为什么 release-perform 不起作用?我已经测试了部署功能,并且可以将工件部署到远程存储库,没有任何异常。

[INFO] [ERROR] BUILD ERROR
[INFO] [INFO] Failed to configure plugin parameters for: org.apache.maven.plugins:maven-deploy-plugin:2.4
[INFO] check that the following section of the pom.xml is present and correct:
[INFO] <distributionManagement>
[INFO]   <!-- use the following if you're not using a snapshot version. -->
[INFO]   <repository>
[INFO]     <id>repo</id>
[INFO]     <name>Repository Name</name>
[INFO]     <url>scp://host/path/to/repo</url>
[INFO]   </repository>
[INFO]   <!-- use the following if you ARE using a snapshot version. -->
[INFO]   <snapshotRepository>
[INFO]     <id>repo</id>
[INFO]     <name>Repository Name</name>
[INFO]     <url>scp://host/path/to/repo</url>
[INFO]   </snapshotRepository>
[INFO] </distributionManagement>
[INFO]
[INFO] Cause: Class 'org.apache.maven.artifact.repository.ArtifactRepository' cannot be instantiated
[INFO] Maven execution failed, exit code: '1'

I'm trying to understand the maven-release-plugin (version 2.0, CVS).
The release-prepare works well.
But I do not understand why the release-perform don't work?? I've tested the deploy feature and I can deploy artifacts to the remote repo without any exceptions.

[INFO] [ERROR] BUILD ERROR
[INFO] [INFO] Failed to configure plugin parameters for: org.apache.maven.plugins:maven-deploy-plugin:2.4
[INFO] check that the following section of the pom.xml is present and correct:
[INFO] <distributionManagement>
[INFO]   <!-- use the following if you're not using a snapshot version. -->
[INFO]   <repository>
[INFO]     <id>repo</id>
[INFO]     <name>Repository Name</name>
[INFO]     <url>scp://host/path/to/repo</url>
[INFO]   </repository>
[INFO]   <!-- use the following if you ARE using a snapshot version. -->
[INFO]   <snapshotRepository>
[INFO]     <id>repo</id>
[INFO]     <name>Repository Name</name>
[INFO]     <url>scp://host/path/to/repo</url>
[INFO]   </snapshotRepository>
[INFO] </distributionManagement>
[INFO]
[INFO] Cause: Class 'org.apache.maven.artifact.repository.ArtifactRepository' cannot be instantiated
[INFO] Maven execution failed, exit code: '1'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

七婞 2024-08-30 11:32:30

首先,您应该确保已按照错误本身的建议以正确的方式配置 。然后尝试在命令行中指定 -Dresume=false 来运行 release:prepare 目标,如下所示:

$ mvn release:prepare -Dresume=false

成功完成后,运行 release:perform > 再次进球,错误应该会消失。

First you should make sure that you have configured the <distributionManagement> in the right way, as suggested by the error itself. Then try running the release:prepare goal with specifying -Dresume=false in the command line like this:

$ mvn release:prepare -Dresume=false

Upon successful completion, run the release:perform goal again, the error should hopefully disappear.

掐死时间 2024-08-30 11:32:30

我已经解决了这个问题。我尝试从我的子 POM 中发布。父 POM 中指定的存储库 url。但为什么我的孩子POM没有继承它......

I've resolve the issue. I tried to make the release from the my child POM. The repository url specified in the parent POM. But why my child POM didn't inherit it...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文