首先我们要搞清楚"Failed to read artifact descriptor for xxx:jar"的错误的根源.
仓库对应依赖的文件夹下检查lastupdate文件找到错误根源
若发现报connect timed out(连接超时)则更换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下载只会选择第一个,放再多镜像只有第一个起作用
非网络原因
删除错误jar 然后利用idea重新下载jar 包
或者将jar下载好直接利用mvn install命令 maven导入jar方式 我博客有相关操作 请看 Oraclejar导入那篇文章