Maven版本:执行失败

问题描述 投票:1回答:2

我试图了解Maven-release-plugin(2.0版,CVS)。release-prepare效果很好。但是我不明白为什么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'
maven-2 maven-release-plugin
2个回答
6
投票

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

$ mvn release:prepare -Dresume=false

成功完成后,再次运行release:perform目标,该错误有望消失。


1
投票

我已经解决了这个问题。我试图从我的孩子POM中释放该版本。在父POM中指定的存储库URL。但是为什么我的孩子POM没有继承...

© www.soinside.com 2019 - 2024. All rights reserved.