解决:Failed to execute goal org.apache.maven.pluginsmaven-deploy-plugin2.8.2deploy (default-

前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到教程。

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

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 中忘记了配置 私服信息,加上就可以了:

  <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 。

更多请见文章:Docker 方式安装、运行 Nexus3 、重置默认密码、推送 jar 包到私服

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值