zoukankan      html  css  js  c++  java
  • 用m2eclipse创建Maven项目时报错

    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 epositoryorgapachemavenpluginsmaven-surefire-plugin2.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项目,相关的东西没有预下载才导致了这个问题呢,其实只要稍等片刻待它下载完成就行了呢?

    以上纯属猜测。。。。。

  • 相关阅读:
    学习html5 中的canvas(一)
    js中的width问题
    css3中我们不知道的一些属性
    css3的渐变效果
    校园商铺-6店铺编辑列表和列表功能-1店铺信息编辑之Dao层开发
    校园商铺-4店铺注册功能模块-14前后端联调技巧细化与总结
    校园商铺-4店铺注册功能模块-13前后端联调验证整体模块功能
    校园商铺-4店铺注册功能模块-12引入kaptcha实现验证码
    11-接下来如何做
    10-K最近邻算法
  • 原文地址:https://www.cnblogs.com/dyc-cfc/p/4178943.html
Copyright © 2011-2022 走看看