Maven 2 Mirror 配置
开始以为是internet 代理设置有问题。网上也有帖子这么说。可是换到ADSL后,不用代理了,问题仍然存在。
?
几经周折后发现,原因在于我画蛇添足多加了几个镜像,其中有的镜像没有同步更新maven库。经过测试,如下maven 镜像工作正常:
?
<settings>
<mirror>
<id>ibiblio.org</id>
<name>ibiblio Mirror of http://repo1.maven.org/maven2/</name>
<url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
<mirrorOf>central</mirrorOf>
<!-- United States, North Carolina -->
</mirror>
<mirror>
<id>redv.com</id>
<url>http://mirrors.redv.com/maven2</url>
<mirrorOf>central</mirrorOf>
<!-- Shanghai, China , Very fast -->
</mirror>
<mirror>
<id>dotsrc.org</id>
<url>http://mirrors.dotsrc.org/maven2</url>
<mirrorOf>central</mirrorOf>
<!-- Denmark -->
</mirror>
<mirror>
<id>sunsite.dk</id>
<url>http://mirrors.sunsite.dk/maven2</url>
<mirrorOf>central</mirrorOf>
<!-- Denmark -->
</mirror>
<mirror>
<id>skynet.be</id>
<url>http://maven2.mirrors.skynet.be/pub/maven2</url>
<mirrorOf>central</mirrorOf>
<!-- Belgium -->
</mirror>
<mirror>
<id>cica.es</id>
<url>http://ftp.cica.es/mirrors/maven2</url>
<mirrorOf>central</mirrorOf>
<!-- Spain, Sevilla -->
</mirror>
<!-- these just point to ibiblio.org -->
<mirror>
<id>ibiblio.net</id>
<name>ibiblio.net Mirror of http://repo1.maven.org/maven2/</name>
<url>http://www.ibiblio.net/pub/packages/maven2</url>
<mirrorOf>central</mirrorOf>
<!-- United States, North Carolina Fast -->
</mirror>
</settings>