转 彻底解决m2eclipse之Unable to update index for central |

简介:

maven是个好东西,eclipse上的maven插件m2eclipse也非常方便,但是最近这个东西经常无法连接到maven index的更新网站,然后eclipse就很无奈的出现提示out of momery... 
google了下,发现大片的相同问题,但是解决方案就大都比较 
而且有个解决方法被无数人转载——直接禁用maven index的自动更新。。。 好吧,我知道不用maven的人很多。。。对这部分人来说禁用确实是个办法。。。 
不过经常要用的怎么办?目前我就有不少地方需要经常更改pom.xml,试验新的东西,如果每次都要去网页里搜索那就太悲剧了。。。 
这个问题的原因很明显:m2eclipse连不上maven index更新站点,咱们不谈原因,遇到这种问题日程解决的办法有: 
1 弄个代理继续上 
这里可以设置.m2/settings.xml内的proxy部分,加上代理就ok。限制是你得有稳定好使的代理。。。虽然我有个常用的代理,不过这两天同样不好使。。略过 
2 自已架设or找个镜像站连上去 
自已架设。。。由于想尽快搞定,不去花这心思了。。 
然后就镜像吧。一开始想找国内的,失败了。。。环境太恶劣,不说了 
最后在maven官方镜像介绍的doc里找到个uk的镜像。。。试了下,能用。OK,就是它了: 
也是在.m2/settings.xml内设置 

?
1
2
3
4
5
6
< mirror >  
     < id >UK</ id >  
     < name >UK Central</ name >  
     < url >http://uk.maven.org/maven2</ url >  
     < mirrorOf >central</ mirrorOf >  
</ mirror >
目录
相关文章
|
jenkins 持续交付
项目采坑日志——cannot create a build with number 9 since that (or higher) is already in use among [12]
项目采坑日志——cannot create a build with number 9 since that (or higher) is already in use among [12]
164 0
|
9天前
|
Java Maven Android开发
【Azure Developer】VS Code打包Java maven Project 遇见 BUILD FAILURE
Unknown lifecycle phase "lean". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>
|
3月前
|
Java Maven
IDEA 报 Unable to import maven project: See logs for details
IDEA 报 Unable to import maven project: See logs for details
48 0
|
6月前
|
Android开发
双击eclipse提示an error has occurred See the log file E:\javatool\eclipse-mars-2\configuration\156991769
双击eclipse提示an error has occurred See the log file E:\javatool\eclipse-mars-2\configuration\156991769
74 1
|
缓存 Java Maven
Idea Maven错误:was cached in the local repository, resolution will not be reattempted until the update
Idea Maven错误:was cached in the local repository, resolution will not be reattempted until the update
1849 0
|
前端开发 Android开发
MAC安装Eclipse出错:Executing bootstrap tasks
MAC安装Eclipse出错:Executing bootstrap tasks
101 0
解决bug:AndroidStudio导项目出异常Minimum supported Gradle version is 3.3.Current version is 2.14
解决bug:AndroidStudio导项目出异常Minimum supported Gradle version is 3.3.Current version is 2.14
326 0
解决bug:AndroidStudio导项目出异常Minimum supported Gradle version is 3.3.Current version is 2.14
|
Java Maven
Unable to import maven project: See logs for details IDEA问题解决办法
本文介绍Unable to import maven project: See logs for details IDEA问题的解决办法。
359 0
Unable to import maven project: See logs for details IDEA问题解决办法
|
开发工具 git iOS开发
IntelliJ中Git突然不能用,报错 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)
IntelliJ中Git突然不能用,报错 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)
268 0
IntelliJ中Git突然不能用,报错 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)
|
JavaScript 前端开发 Java
What happened when we perform Maven Update Project in Eclipse
What happened when we perform Maven Update Project in Eclipse
130 0
What happened when we perform Maven Update Project in Eclipse