前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >解决:Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy)

解决:Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy)

作者头像
微风-- 轻许--
发布2020-01-02 11:03:34
25.4K0
发布2020-01-02 11:03:34
举报
文章被收录于专栏:java 微风

1. 执行 mvn clean deploy ... 想把 jar 包更新到私服仓库,报错:

代码语言:javascript
复制
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy 
(default-deploy) on project xxx-xxx-xxx: Deployment failed: repository element 
was not specified in the POM inside distributionManagement element or in -
DaltDeploymentRepos

2. 原因:在pom 中忘记了配置 私服信息,加上就可以了:

代码语言:javascript
复制
  <distributionManagement>
        <repository>
            <id>maven-release</id>
            <name>Nexus Release Repository</name>
            <url>http://xx.xx.xx.xx:8081/repository/maven-releases/</url>
        </repository>

        <snapshotRepository>
            <id>maven-snapshots</id>
            <name>Nexus Release Repository</name>
            <url>http://xx.xx.xx.xx:8081/repository/maven-snapshots/</url>
        </snapshotRepository>
  </distributionManagement>

配置的值来自私服此页面,左边是 id , 右边点击 copy 可得 url 。

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档