maven下载依赖jar包失败的一个很笨的处理方法

遇到的问题:

在problems 中看到“The container 'Maven Dependencies' references non existing library 'D:\rj\maven\repository\org\apache\commons\commons-math3\3.6.1\commons-math3-3.6.1.jar'dgcreditBuild pathBuild Path Problem”这样的错,尽管配置了主仓库,并按设定顺序进行查找多个仓库地址,但总会遇到无法下载jar包的情况

我这里有个maven下载依赖jar包失败的很笨的处理方法如下:

解决方法:

1、确定是jar包没有下载成功,如下图,提示commons-math3-3.6.1.jar包不存在


或者 

选中项目 -- > 右键 -->  Build Path -- > Configure Build Path...  -- > Maven Dependencies     -->  有如下提示commons-math3-3.6.1.jar包不存在:


这样就可以确定是否是缺jar包了

2、到maven仓库官网http://mvnrepository.com/(或者可下载的网站)下载“commons-math3-3.6.1.jar”r包

3、把下载好的“commons-math3-3.6.1.jar”包放到“D:\rj\maven\repository\org\apache\commons\commons-math3\3.6.1”目录中

4、选中项目 --> 右键 -- >  Maven4MyEclipse  -- > Update Project Configurations... -- > ok

5、再次检查还有没有没下载成功的jar,依次这样做即可

6、The end


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章