码迷,mamicode.com
首页 > 系统相关 > 详细

用m2eclipse创建Maven项目时报错??

时间:2014-12-22 21:04:37      阅读:225      评论:0      收藏:0      [点我收藏+]

标签:

Could not calculate build plan: Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from/to central (http://repo1.maven.org/maven2): Access denied to http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.7.1/maven-surefire-plugin-2.7.1.pom. Error code 407, Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied.  )

大体就是诸如此类的问题,忙活了半天。

eclipse是才下的luna版,里面自带maven,一开始以为是系统自带的mvn不好用,又依葫芦画瓢自己去网站上下了一个maven3.2.5,设置环境变量巴拉巴拉搞了好久,最后发现还是不行,颇为气馁,原本打算按照别人的方法

(解决方法:

1.找到maven库目录,进入:~\.m2\repository\org\apache\maven\plugins\maven-surefire-plugin\2.7.1

2.若2.7.1目录下只有,"maven-surefire-plugin-2.7.1.pom.lastUpdated" 则需要到http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.7.1/,把里面的文件下载下来放到2.7.1

3.删除2.7.1下的maven-surefire-plugin-2.7.1.pom.lastUpdated文件。

4.项目右键-->maven-->Update Dependencies)

这样子搞一下,但中途又去吃了个晚饭,也没来得及弄,回来时发现已经不报错了。。。颇为神奇。

我去maven库目录中查看了一下,发现相关的jar已经下载完成了,猜想是不是因为这个eclipse之前没有弄过maven项目,相关的东西没有预下载才导致了这个问题呢,其实只要稍等片刻待它下载完成就行了呢?

以上纯属猜测。。。。。

用m2eclipse创建Maven项目时报错??

标签:

原文地址:http://www.cnblogs.com/dyc-cfc/p/4178943.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!