Failed to read artifact descriptor--maven问题

检查我的setting.xml,我的镜像用的是大家比较推荐的两个:

<mirror>
  <id>CN</id>
  <name>OSChina Central</name>
  <url>http://maven.oschina.net/content/groups/public/</url>
  <mirrorOf>central</mirrorOf>
</mirror>
<mirror>

  <id>nexus-osc-thirdparty</id>
  <mirrorOf>thirdparty</mirrorOf>
  <name>Nexus osc thirdparty</name>
  <url>http://maven.oschina.net/content/repositories/thirdparty/</url>
</mirror>

但是,有时候,网络环境这东西你懂的,换个其他的镜像多试验一下,顺利解决,红色可用

<mirror>
  <id>repo2</id>
  <mirrorOf>central</mirrorOf>
  <name>Human Readable Name for this Mirror.</name>
  <url>http://repo2.maven.org/maven2/</url>
</mirror>

将镜像放到其他镜像的前面!

按照我的使用经验,次序靠前的镜像会被使用,你放的再多,maven也不会按照次序依次选择的。

猜你喜欢

转载自blog.csdn.net/java_peak_zlf/article/details/84062190