2010-02-24 165 views
0

我想了解maven-release-plugin(版本2.0,CVS)。 release-prepare效果很好。 但我不明白为什么发布执行不起作用??我已经测试了部署功能,并且可以将工件部署到远程仓库中,而无任何例外。maven版本:执行失败

[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' 
+0

这将很难回答在这里,也许你可以给这个线程阅读http://stackoverflow.com/questions/810957/maven-release-plugin-war-stories – 2010-02-24 10:23:50

+1

你添加了什么配置发布插入?你使用的是什么版本的发布插件?什么版本的Maven? – 2010-02-24 13:58:26

回答

1

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

+0

所以你的意思是对git仓库的引用应该也在儿童POM中呢? – octavian 2017-03-01 15:43:29

5

首先,您应该确保您已按错误本身的建议以正确的方式配置distributionManagement。然后尝试运行的版本:准备目标指定命令行“-Dresume =假”是这样的:

$ mvn release:prepare -Dresume=false 

成功完成后,运行该版本:再次执行目标,误差应该有希望消失。

+0

“-Dresume = false”是什么意思? – octavian 2017-03-01 17:07:53