记一次maven报错解决:Failed to read artifact descriptor for com.aliyun.openservices:aliyun-openservices:jar:2.0.0-OTS

原创 2018-02-26 18:06 阅读(5418)次

今天从svn更新代码后,代码一直报错,pom.xml文件也显示有错误,看了代码后发现是同事用了aliyun的一些包,他开发的时候,jar还可以下载,过了几天到我这对应jar从maven中下载不下来,还连他现在也下载不了了,我Maven install后也是报错:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.733 s
[INFO] Finished at: 2018-02-26T17:55:01+08:00
[INFO] Final Memory: 9M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project ali_crawl: Could not resolve dependencies for project com.cloud:ali_crawl:war:0.0.1-SNAPSHOT: Failed to collect dependencies at com.aliyun.openservices:aliyun-openservices:jar:2.0.0-OTS: Failed to read artifact descriptor for com.aliyun.openservices:aliyun-openservices:jar:2.0.0-OTS: Failure to find com.taobao:parent:pom:1.0.2 in http://www.ebi.ac.uk/intact/maven/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of ebi has elapsed or updates are forced -> [Help 1]
[ERROR] 

pom.xml文件配置如下:

		<dependency>
			<groupId>com.aliyun.openservices</groupId>
			<artifactId>aliyun-openservices</artifactId>
			<version>2.0.0-OTS</version>
		</dependency>


重复操作了几次Maven clean和install,对应的jar一直下载不下来。总是报如上错误,后来叫旁边同事看了下,他怀疑是不是版本问题,后来换一个版本重新下载,发现项目不报错了,jar下载下来了,可能是仓库里的2.0.0-OTS版本被删除了或有问题下架了吧。所以这个问题告诉我们,jar包下载不下来时,换个版本也是一种解决方案。

改完后的pom.xml配置:

		<dependency>
			<groupId>com.aliyun.openservices</groupId>
			<artifactId>aliyun-openservices</artifactId>
			<version>OTS-2.0.4</version>
		</dependency>