在开发的过程中,作为新手,经常遇到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. MySQL工具:管理员必备的10款MySQL工具

    MySQL是一个复杂的的系统,需要许多工具来修复,诊断和优化它.幸运的是,对于管理员,MySQL已经吸引了很多软件开发商推出高品质的开源工具来解决MySQL的系统的复杂性,性能和稳定性,其中大部分是免 ...

  2. asp存储过程

    dim s_ip,MyComm s_ip=request.ServerVariables("REMOTE_ADDR") Set MyComm = Server.CreateObje ...

  3. 关于RotateAnimation的各构造方法的参数

    本文以RotateAnimation的构造方法 讲解. RotateAnimation(float fromDegrees, float toDegrees) 其他构造器的旋转也可参考这副图. Rot ...

  4. SPOJ 1739 Yet Another Equation(Pell方程)

    题目链接:http://www.spoj.com/problems/EQU2/ 题意:给出方程x^2-n*y^2=1的最小整数解. 思路:参见金斌大牛的论文<欧几里得算法的应用>. imp ...

  5. mongoDB使用复制还原数据库节省空间

    用db.copyDatabase可以备份复制数据的方法. 1.db.copyDatabase("from","to","127.0.0.1:16161 ...

  6. java I/O总结

    IO是非常重要的一块,但通常又被人们所忽视,这里希望能有个很清晰的介绍.自己学习的同时希望能够给别人带来一些帮助,对文章中用到其他作者(已经给出了链接)的图片在这里表示感谢! IO的分类 java I ...

  7. git(icode)分支及发布管理方式

    如果git(icode)不加管理,可能出现枝节蔓生.四处开放的版本库.到处都是分支,完全看不出主干发展的脉络,造成下图的局面: 为了降低合并和版本管理的成本,团队引入一种值得借鉴的管理方式(link) ...

  8. Repeater上下排序按钮

    aspx代码 <table cellspacing="0" cellpadding="0" width="100%" align=&q ...

  9. const,readonly 常量与只读

    Const是常量 Const在编译时会被编译为静态成员,它确定于编译时期,属类型级,通过类型来访问. 现在通过以下几种情况来说明const常量: (1)初始化 public const string  ...

  10. 代码开光,Orz

    有一次在cf上看到了,666,- - // // _oo0oo_ // o8888888o // 88" . "88 // (| -_- |) // 0\ = /0 // ___/ ...