Failed to read artifact descriptor for xxx:jar的问题解决
2018-03-22 19:27
615 查看
在开发的过程中,尤其是新手,我们经常遇到Maven下载依赖jar包的问题,也就是遇到“Failed to read artifact descriptor for xxx:jar”的错误。对于这种非业务相关的问题,耽误时间非常不效率,而且网上的解决思路过于老套,而且还没什么用。1)要么就是,删除仓库内对应依赖的文件夹,右单击项目,Maven4MyEclipse->Update Project,在弹出的对话框中选择“Force Update Of Snapshots/Releases",然后点击“OK”。这样就会重新下载这个jar包。2)要么就是,将依赖下载至本地,执行mvn install命令,其实这些方法都不适用于eclipse+java的开发中,而且让人头疼。其实,遇到“Failed to read artifact descriptor for xxx:jar”的报错,就是jar包下载失败而导致的,你可以到Maven的仓库中去查看(也就是.m2\repository那个路径下的)xxx-m2e-lastUpdated.properties文件,用记事本打开,里面描述的报错提示就是“connect timed out(连接超时)”:
那这个时候,赶紧去在eclipse指定的settings.xml文件添加mirror地址(经测试,http://repo2.maven.org/maven2/可用):<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2/</url>
</mirror>
最后,再回到eclipse,右击你所需要下载jar包依赖的项目,选择“Update Project” -> 勾选"Force Update of Snapshots/Releases":
那这个时候,赶紧去在eclipse指定的settings.xml文件添加mirror地址(经测试,http://repo2.maven.org/maven2/可用):<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2/</url>
</mirror>
最后,再回到eclipse,右击你所需要下载jar包依赖的项目,选择“Update Project” -> 勾选"Force Update of Snapshots/Releases":
相关文章推荐
- Failed to read artifact descriptor for xxx:jar的问题解决
- (Maven配置)Failed to read artifact descriptor for xxx:jar解决方法
- IntelliJ maven项目pom文件错误failed to read artifact descriptor for xx.jar问题解决办法
- Failed to read artifact descriptor for xxx:jar
- Failed to read artifact descriptor for xxx:jar
- Failed to read artifact descriptor for xxx:jar:版本号
- Failed to read artifact descriptor for xxx:jar
- Failed to read artifact descriptor for xxx:jar
- Failed to read artifact descriptor for xxx:jar
- Failed to read artifact descriptor for xxx:jar
- maven clean package 时出现Failed to read artifact descriptor for的问题解决
- Failed to read artifact descriptor for xxx:jar 和Missing artifact
- 解决 Failed to read artifact descriptor for org.apache.maven.plugins:maven-jar-plugin:jar:2.6
- Failed to read artifact descriptor for xxx:jar
- Failed to read artifact descriptor for xxx:jar
- Failed to read artifact descriptor for org.apache.ws.commons:XmlSchema:jar:1.1:
- Failed to read artifact descriptor for com.fasterxml.jackson.core:jackson-databind:jar:2.9.0-SNAPSHO
- Failed to read artifact descriptor for org.apache.httpcomponents:httpmime:jar
- Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.7
- Maven项目pom.xml文件报错“ ArtifactDescriptorException: Failed to read artifact descriptor for ...”解决方法