简体   繁体   English

Maven 发布:执行失败

[英]maven release:perform failed

I'm trying to understand the maven-release-plugin (version 2.0, CVS).我正在尝试了解 maven-release-plugin(2.0 版,CVS)。 The release-prepare works well.发布准备工作很好。 But I do not understand why the release-perform don't work??但我不明白为什么release-perform不起作用?? 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'

First you should make sure that you have configured the <distributionManagement> in the right way, as suggested by the error itself.首先,您应该确保按照错误本身的建议以正确的方式配置了<distributionManagement> Then try running the release:prepare goal with specifying -Dresume=false in the command line like this:然后尝试在命令行中指定-Dresume=false来运行release:prepare目标,如下所示:

$ mvn release:prepare -Dresume=false

Upon successful completion, run the release:perform goal again, the error should hopefully disappear.成功完成后,再次运行release:perform目标,错误应该会消失。

I've resolve the issue.我已经解决了这个问题。 I tried to make the release from the my child POM.我试图从我的孩子 POM 中发布。 The repository url specified in the parent POM.在父 POM 中指定的存储库 url。 But why my child POM didn't inherit it...但是为什么我的孩子 POM 没有继承它......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM