maven发布:执行失败

eug*_*enn 0 maven-2 maven-release-plugin

我正在尝试理解maven-release-plugin(版本2.0,CVS).在释放准备工作很好.但我不明白为什么发布 - 执行不起作用?我已经测试了部署功能,我可以将工件部署到远程仓库,没有任何例外.

[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'
Run Code Online (Sandbox Code Playgroud)

Ove*_*low 5

首先,您应确保以正确的方式配置distributionManagement,如错误本身所示.然后你尝试运行发布:准备目标指定命令行"-Dresume = false",如下所示:

$ mvn release:prepare -Dresume=false
Run Code Online (Sandbox Code Playgroud)

成功完成后,运行发布:再次执行目标,错误应该有望消失.