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

来源:互联网 发布:迅捷聊天记录恢复软件 编辑:程序博客网 时间:2024/05/17 23:12

问题报错:

[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>
阅读全文
0 0
原创粉丝点击