在开发的过程中,作为新手,经常遇到Maven下载依赖的时候,"Failed to read artifact descriptor for xxx:jar"的错误

对于这种非业务相关的问题,耽误时间非常不效率,看到网站很多博文,思路大概是这样的

思路1: 删除仓库内对应依赖的文件夹,右单击项目,Maven4MyEclipse->Update Project,在弹出的对话框中选择“Force Update Of Snapshots/Releases",然后点击“OK”。这样就会重新下载这个jar包。

思路2: 将依赖下载至本地,执行mvn install命令

如果在没有搞清楚问题的时候就鲁莽的进行上面的操作,可能不一定能很及时的解决问题.

首先我们要搞清楚"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也不会按照次序依次选择的

新手经验,不恰当的多多交流

  

Failed to read artifact descriptor--maven问题总结(能力工场)的更多相关文章

  1. Maven错误Failed to read artifact descriptor for xxx:jar 和 missing artifact maven dependency

    可参考:http://stackoverflow.com/questions/6111408/maven2-missing-artifact-but-jars-are-in-place http:// ...

  2. Failed to read artifact descriptor for xxx:jar 的Maven项目jar包依赖配置的问题解决

    在开发的过程中,尤其是新手,我们经常遇到Maven下载依赖jar包的问题,也就是遇到“Failed to read artifact descriptor for xxx:jar”的错误. 对于这种非 ...

  3. Maven项目报错:Missing artifact****和ArtifactDescriptorException: Failed to read artifact descriptor for***和Cannot change version of project facet Dynamic web module to 2.5

    一.关于Cannot change version of project facet Dynamic web module to 2.5 具体查看博客:http://blog.csdn.net/ste ...

  4. maven clean package 时出现Failed to read artifact descriptor for的问题解决

    maven clean package 时出现Failed to read artifact descriptor for的问题 [ERROR] Failed to execute goal on p ...

  5. Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1

    Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be res ...

  6. Maven:Failed to read artifact descriptor for xxx

    Maven多模块项目jar包引用问题: Failed to execute goal on project xxx-service: Could not resolve dependencies fo ...

  7. Eclipse:报错Failed to read artifact descriptor for org.springframework.boot:spring-boot-autoconfigure:jar:2.1.2.

    导入SVN下载的MAVEN项目时springboot报错: pom.xml文件报错 Failed to read artifact descriptor for org.springframework ...

  8. Failed to read artifact descriptor for xxx:jar的问题解决

    在开发的过程中,尤其是新手,我们经常遇到Maven下载依赖jar包的问题,也就是遇到“Failed to read artifact descriptor for xxx:jar”的错误. 对于这种非 ...

  9. Failed to read artifact descriptor for xxx:jar

    在MyEclipse中执行Maven的install命令时,报“Failed to read artifact descriptor for xxx:jar ”的错误.这可能是在下载过程中文件出现错误 ...

  10. artifactdescriptorexception:Failed to read artifact descriptor for xxx:jar ”

    在Eclipse中执行Maven的install命令时,报“Failed to read artifact descriptor for xxx:jar ”的错误.这可能是在下载过程中文件出现错误.或 ...

随机推荐

  1. hibernate CascadeType属性说明

    CascadeType.PERSIST //只有A类新增时,会级联B对象新增.若B对象在数据库存(跟新)在则抛异常(让B变为持久态) CascadeType.MERGE //指A类新增或者变化,会级联 ...

  2. 32-语言入门-32-Triangular Sums

    题目地址: http://acm.nyist.net/JudgeOnline/problem.php?pid=122    描述The nth Triangular number, T(n) = 1 ...

  3. Spring 注解@Transactional

    Spring事务的传播行为 在service类前加上@Transactional,声明这个service所有方法需要事务管理.每一个业务方法开始时都会打开一个事务. Spring默认情况下会对运行期例 ...

  4. 第六篇 ORACLE EBS用户界面通用元素或功能背后的道理解析

    本篇打算介绍一下ORACLE EBS用户界面(User Interface)中通用的元素或功能背后蕴含的一些道理.这些通用元素或功能包括: List of Values (LOV),值列表 Flexf ...

  5. 通过两个GPS计算两个GPS点的距离

    public static double GetDistance(double lat1, double lng1, double lat2, double lng2) { double radLat ...

  6. Hadoop集群(第8期)_HDFS初探之旅

    1.HDFS简介 HDFS(Hadoop Distributed File System)是Hadoop项目的核心子项目,是分布式计算中数据存储管理的基础,是基于流数据模式访问和处理超大文件的需求而开 ...

  7. HTML5中的localStorage用法

    存储数据的方法就是直接给window.localStorage添加一个属性,例如:window.localStorage.name 或者 window.localStorage["name& ...

  8. PopupWindwo和AlertDialog的区别

      AlertDialog 是非阻塞式对话框:AlertDialog弹出时,后台还可以做事情:而PopupWindow是阻塞式对话框:PopupWindow弹出时, 程序会等 待,在PopupWind ...

  9. Python3 学习第八弹: 模块学习一之模块变量

    __name__变量 用于判断该python文件是否作为主程序运行.若该文件为导入,__name__值为其文件名,若为主程序,则其值为__main__ 这也就是为什么经常看到有一些python文件中有 ...

  10. hdu1050(贪心)

    囧 . 想了好久,一开始想的是一个连通图怎样用黑白两色染色,想了各种算法发现都不好做,然后灵机一动这不是网路流吗,然后想怎么建图,如果转换成网络流这题就好做了,建图加个二分应该就可以解决了,最后又发现 ...