Centos - 目录
执行 Maven deploy
生命周期提示以下信息:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project xxx: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
deploy
插件 2.7 版本和 2.8 版本有配置上的差异。
以下内容仅供参考,请根据自己的仓库信息自行调整
)<distributionManagement>
<repository>
<id>rdc-release</id>
<url>https://packages.aliyun.com/maven/repository/xxx-release-xxx/</url>
</repository>
<snapshotRepository>
<id>rdc-snapshot</id>
<url>https://packages.aliyun.com/maven/repository/xxx-snapshot-xxx/</url>
</snapshotRepository>
</distributionManagement>
以下内容仅供参考,请根据自己的仓库信息自行调整
)<profiles>
<profile>
<id>rdc</id>
<properties>
<altReleaseDeploymentRepository>
rdc-releases::default::https://packages.aliyun.com/maven/repository/xxx-release-xxx/
</altReleaseDeploymentRepository>
<altSnapshotDeploymentRepository>
rdc-snapshots::default::https://packages.aliyun.com/maven/repository/xxx-snapshot-xxx/
</altSnapshotDeploymentRepository>
</properties>
</profile>
</profiles>
根据自己情况选择对应解决方案
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8</version>
</plugin>
<distributionManagement>
<repository>
<id>rdc-release</id>
<url>https://packages.aliyun.com/maven/repository/xxx-release-xxx/</url>
</repository>
<snapshotRepository>
<id>rdc-snapshot</id>
<url>https://packages.aliyun.com/maven/repository/xxx-snapshot-xxx/</url>
</snapshotRepository>
</distributionManagement>