mvn -deploy 报错Failed to deploy artifacts: Could not find artifact

问题报错:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project apollo: Failed to deploy artifacts: Could not find artifact com.ctrip.framework.apollo
:apollo:pom:0.8.0 in releases (http://ip:8081/nexus/content/repositories/) -> [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

问题分析:从报错看无法找到apollo:pom:0.8.0 这个pom文件, 但是从私服Nexus上看releases仓Repository Path 的地址为
http://ip:8081/nexus/content/repositories/
于是想到路径可能不对,查找maven的setting.xml,发现里面有配置路径:

<properties>
    <releases.repo>http://ip:8081/nexus/content/repositories/</releases.repo>
    <snapshots.repo>http://ip:8081/nexus/content/repositories/</snapshots.repo>
</properties>

问题解决:
这个路径是公司其他同事配置好的,这个路径刚好与报错信息中的路径一致,路径与私服上这两个仓库的路径不一样,随修改之,

<properties>
    <releases.repo>http://ip:8081/nexus/content/repositories/releases/</releases.repo>
    <snapshots.repo>http://ip:8081/nexus/content/repositories/snapshots/</snapshots.repo>
</properties>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值