1

我正在尝试了解 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'
4

2 回答 2

7

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

$ mvn release:prepare -Dresume=false

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

于 2011-12-22T13:59:06.170 回答
1

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

于 2010-02-25T08:34:30.740 回答