[Java] Maven在中国执行的问题及解决

博客首页 » Java Maven在中国执行的问题及解决

发布于 09 Jun 2014 00:47
标签 blog
在中国执行Maven会有链接不上的现象,调整repository的位置就可以解决这个问题。

http://docs.codehaus.org/display/MAVENUSER/Mirrors+Repositories

Introduction

This page list all mirrors repositories for central repositories. repo.maven.apache.org points to repo1.maven.org, which is a globally balanced CNAME that will direct you to the closest mirror for highest performance. Read more about the details here: http://www.sonatype.com/people/2011/07/the-central-repository-is-getting-faster-are-you-ready-for-the-new-ips/

Please read http://maven.apache.org/guides/mini/guide-mirror-settings.html for how to configure a mirror with Maven.

Please check the last_updated.txt file in the repository root to confirm that the mirror you are using is up to date.

Globally balanced urls for Central

United States, California

http://repo1.maven.org/maven2

<mirror>
<id>Central</id>
<url>http://repo1.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
<!— United States, St. Louis—>
</mirror>
United Kingdom
http://uk.maven.org/maven2

(this is a globally balanced dns, the same as repo1)

<mirror>
<id>uk.maven.org</id>
<url>http://uk.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
<!— United Kingdom —>
</mirror>
Mirrors Repositories Pushed Directly from Central

United States, North Carolina

http://mirrors.ibiblio.org/pub/mirrors/maven2

<mirror>
<id>ibiblio.org</id>
<url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
<mirrorOf>central</mirrorOf>
<!— United States, North Carolina —>
</mirror>

Independent Proxies of Central

Location

URL

Configuration

France

http://maven.antelink.com/content/repositories/central/

<mirror>
<id>antelink.com</id>
<url>http://maven.antelink.com/content/repositories/central/</url>
<mirrorOf>central</mirrorOf>
<!— France —>
</mirror>


本页面的文字允许在知识共享 署名-相同方式共享 3.0协议和GNU自由文档许可证下修改和再使用,仅有一个特殊要求,请用链接方式注明文章引用出处及作者。请协助维护作者合法权益。


系列文章

文章列表

  • Java Maven在中国执行的问题及解决

这篇文章对你有帮助吗,投个票吧?

rating: 0+x

留下你的评论

Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License