maven坑-Failure to transfer org.apache.maven:maven
参考网址:http://www.mkyong.com/maven/how-to-convert-maven-java-project-to-support-eclipse-ide/
https://blog.csdn.net/gsycwh/article/details/52792633
问题描述:
在创建Maven项目时,经常会在pom.xml的第一行处报错,提示信息如下:
Failure to transfer org.apache.maven:maven-surefire-plugin:jar:2.5 from http:// repo.maven.apache.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:maven- archiver:jar:2.5 from/to central (http://repo.maven.apache.org/maven2): The operation was cancelled.
问题分析:
maven的plugin并未下载到本地
解决办法1(优先):
1.Navigate to your Java project folder, where pom.xml file is placed.
mvn eclipse:eclipse
【 如果有错误,会显示错误的原因。】
2.根据错误原因,你可以到本地库中搜索“.lastUpdated”结尾的文件,找到一份 maven-surefire-plugin-2.7.1.pom.lastUpdated的文件,将其删除。如未自行设置,本地仓库为C:\Users\admin\.m2\repository。
3. mvn eclipse:eclipse
【成功】
解决办法2:
1. 你可以到本地库中搜索“.lastUpdated”结尾的文件,找到一份 maven-surefire-plugin-2.7.1.pom.lastUpdated的文件,将其删除。如未自行设置,本地仓库为C:\Users\admin\.m2\repository。
2.回到项目中,在项目右键点击project -> Maven -> Update Dependencies(Update Project…)更新项目,这时候应该就没有错了。
注意:
1.maven-surefire-plugin-2.7.1.pom.lastUpdated文件不是固定的,而是要看报错的具体信息,如上面错误信息中,主要看报错的maven:后面紧跟的信息
2.方法一和方法二的区别在于 错误的原因更详细、具体、准确。
maven坑-Failure to transfer org.apache.maven:maven的更多相关文章
- Maven 问题 Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:3.0.0-M1 的处理
一.问题描述 Maven项目报错,该项目是导入的项目,然后再通过开发工具打开项目时,pom.xml文件报错. 并且新建Maven Project 也会报错. 二.报错详细Failure to tran ...
- Failure to transfer org.apache.maven:maven-archiver:pom:2.5 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval o
pom.xml报错: Failure to transfer org.apache.maven:maven-archiver:pom:2.5 from https://repo.maven.apach ...
- Failure to transfer org.apache.maven:maven-archiver:pom:2.5 from http://repo.maven.apache.org/ maven2 was cached in the local repository, resolution will not be reattempted until the update interv
Failure to transfer org.apache.maven:maven-archiver:pom:2.5 from http://repo.maven.apache.org/ mave ...
- Maven问题:Failure to transfer org.apache.maven
Maven报错:Failure to transfer org.apache.maven 在创建Maven项目时,经常会在pom.xml的第一行处报错,提示信息如下: Failure to trans ...
- 解决Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.17 问题
详细报错如下 Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.17 from http://maven ...
- Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4
Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from https://repo.mave ...
- WebMagic编译时提示Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.18的解决方法
问题描述: 从http://git.oschina.net/flashsword20/webmagic 下载最新代码,按照http://webmagic.io/docs/zh/posts/ch3 ...
- maven 新建项目时报错“Could not calculate build plan: Failure to transfer org.apache.maven.plugins:。。。。。。。。。。。。。。”
首先,我们看到观察这个错误:Failure to transfer org.apache.maven.plugins,这种错误是项目部署时,maven所关联的仓库中插件的设置出错了. 所以我们需要找到 ...
- 解决:Failure to transfer org.apache.maven.plugins:maven-jar-plugin:pom:2.4 from错误
在使用Maven时出现以下错误: Failure to transfer org.apache.maven.plugins:maven-jar-plugin:pom:2.4 from https:// ...
随机推荐
- Win10下创建Python3.7创建虚拟环境以及安装Flask框架
鉴于现在看到的很多虚拟环境创建以及flask框架安装方式需要通过dos命令来做,虽然比较常用,但是每次运行都要激活虚拟环境,相对比较麻烦,而现在利用pycharm大可不必如此. 1.安装破解版pych ...
- 【XSY2469】graph 分治 并查集
题目大意 给你一张\(n\)个点\(m\)条边的无向图,问删去每个点后,原图是不是二分图. \(n,m\leq 100000\) 题解 一个图是二分图\(\Longleftrightarrow\)该图 ...
- python学习日记(深浅copy)
赋值 #赋值,指向同一内存地址 l1 = [1,2,3,4,5] l2 = l1 print(l1,l2) print(id(l1),id(l2)) 浅copy #浅copy,第一层互相独立,创建了新 ...
- 搭建web定时任务管理平台
需要安装mysql及gityum -y install git mysql-server 下载安装go官网:https://golang.org/dl/wget https://redirector. ...
- Codeforces | CF1029F 【Multicolored Markers】
这道题其实难度应该小于紫题...除了一点小特判以外没什么难度...\(\leq50\)行代码即可\(AC\)此题 题目大意:给定两个数\(a,b(1\leq a,b\leq 10^{14})\)分别表 ...
- sql 语句查所有父级
常见问题,给一个记录ID,查出它的所有父级,直到顶级 使用SMSS,sql server,找到一个办法. 思路是分两步,先循环找到所有父级的ID,再用IN查出所有父级 列说明 ID=PK Pare ...
- [HEOI2016/TJOI2016]游戏 解题报告
[HEOI2016/TJOI2016]游戏 看起来就是个二分图匹配啊 最大化匹配是在最大化边数,那么一条边就代表选中一个坐标内的点 但是每一行不一定只会有一个匹配 于是把点拆开,按照'#'划分一下就好 ...
- python 验证码识别
一.python识别简单验证码: 代码: ''' func:实现简单验证码获取 ''' import pytesseract from PIL import Image #首先通过Image打开一个图 ...
- 解题:SDOI2018 战略游戏
题面 先圆方树然后建虚树,答案就是虚树大小.虚树没必要建出来,把原来的点的点权设为1,直接dfs序排序后相邻点求距离加上首尾两个点的距离,最后除以二(画一下可以发现是正反算了两遍),注意还要去掉询问点 ...
- LOJ#2353 货币兑换
CDQ分治优化斜率优化DP. 有个结论就是每天买完卖完....知道这个之后考虑今天卖的是哪天买的就能写出n²DP了. 发现形式是fi = max(aibj + cidj)的形式.我们可以把ci除出来, ...