maven发布:执行失败
我试图了解 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先,您应该确保已按照错误本身的建议以正确的方式配置
。然后尝试在命令行中指定-Dresume=false
来运行release:prepare
目标,如下所示:成功完成后,运行
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 therelease:prepare
goal with specifying-Dresume=false
in the command line like this:Upon successful completion, run the
release:perform
goal again, the error should hopefully disappear.我已经解决了这个问题。我尝试从我的子 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...