maven global repository central 无法更新

公司网络有问题,出现maven的global repository cental无法更新,解决办法如下:

1.下载如下两个文件

http://repo1.maven.org/maven2/.index/nexus-maven-repository-index.gz
http://repo1.maven.org/maven2/.index/nexus-maven-repository-index.properties

2.新建工程,将下载的文件放到:

WebContent\maven2\.index中,启动工程. 注意工程要改成不带别名。

3.将C:\WINDOWS\system32\drivers\etc\hosts 文件加入

192.168.88.199 repo1.maven.org

4.reindex maven repository中的central

猜你喜欢

转载自qingwei201314.iteye.com/blog/1559368