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:// ... 
随机推荐
- CF558E-A Simple Task-线段树+计数排序
			计数排序的原理,只要知道了有几个数比i小,就可以知道i的位置 这道题只有26个字母,搞26颗线段树,然后区间更新 #include <cstdio> #include <cstrin ... 
- Vue 快速入门
			Vue框架介绍 中文文档: https://cn.vuejs.org/v2/guide/ Vue是一个构建数据驱动的web界面的渐进式框架. 目标是通过尽可能简单的API实现响应式的数据绑定和组合的视 ... 
- P1387 最大正方形 dp
			思路: i j的最大正方形等于min(他的斜上方的的最大正方形,他的上方有的连续1,他的左方有的连续1)+1 #include<bits/stdc++.h> using namespac ... 
- 爬虫_糗事百科(scrapy)
			糗事百科scrapy爬虫笔记 1.response是一个'scrapy.http.response.html.HtmlResponse'对象,可以执行xpath,css语法来提取数据 2.提取出来的数 ... 
- MT【252】椭圆内接三角形内切圆半径
			已知椭圆$\dfrac{{{x^2}}}{{{a^2}}} + \dfrac{{{y^2}}}{{{b^2}}} = 1$($a > b > 0$),${F_1}$.${F_2}$为其左右 ... 
- 【总结】字符串hash
			序列字符串\(Hash\) 直接hash即可qwq 预处理:\(Hash[3][i]\)(\(Hash\)值),\(Pow[3][i]\)(用来乘系数) 判断相等:\(box_1=Hash[3][i] ... 
- SCOI 2015 Day2 简要题解
			「SCOI2015」小凸玩密室 题意 小凸和小方相约玩密室逃脱,这个密室是一棵有 $ n $ 个节点的完全二叉树,每个节点有一个灯泡.点亮所有灯泡即可逃出密室.每个灯泡有个权值 $ A_i $,每条边 ... 
- POJ2411 铺地砖 Mondriaan's Dream
			Mondriaan's Dream Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 15962 Accepted: 923 ... 
- [2017-7-28]Android Learning Day6
			常用控件 Spinner DatePickerDialog TimePickerDiaog RadioButton CheckBox spinner(下拉菜单) <Spinner android ... 
- [NOI2016]优秀的拆分&&BZOJ2119股市的预测
			[NOI2016]优秀的拆分 https://www.lydsy.com/JudgeOnline/problem.php?id=4650 题解 如果我们能够统计出一个数组a,一个数组b,a[i]表示以 ... 
