maven2——设置镜像篇
http://blog.csdn.net/wxy_g/article/details/1916199
注意安裝好maven后,在$HOME/.m2/中是不會有settings.xml的,我們需要自己拷貝一個上去
設置倉庫鏡像,注意里面有一個上海的站點,估計會快點
?
在($HOME/.m2/settings.xml)中
?
<settings>
? <mirrors>
??? <mirror>
????? <id>ibiblio.org</id>
????? <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
????? <mirrorOf>central</mirrorOf>
????? <!-- United States, North Carolina -->
??? </mirror>
??? <mirror>
????? <id>lsu.edu</id>
????? <url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
????? <mirrorOf>central</mirrorOf>
????? <!-- United States, Louisiana -->
???? </mirror>
??? <mirror>
????? <id>sateh.com</id>
????? <url>http://maven.sateh.com/repository</url>
????? <mirrorOf>central</mirrorOf>
????? <!-- The Netherlands, Amsterdam -->
??? </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>
??? <mirror>
????? <id>redv.com</id>
????? <url>http://mirrors.redv.com/maven2</url>
????? <mirrorOf>central</mirrorOf>
????? <!-- Shanghai, China -->
??? </mirror>
?
??? <!-- these just point to ibiblio.org -->
??? <mirror>
????? <id>ibiblio.net</id>
????? <url>http://www.ibiblio.net/pub/packages/maven2</url>
????? <mirrorOf>central</mirrorOf>
????? <!-- United States, North Carolina -->
??? </mirror>
??? <mirror>
????? <id>ggi-project.org</id>
????? <url>http://ftp.ggi-project.org/pub/packages/maven2</url>
????? <mirrorOf>central</mirrorOf>
????? <!-- The Netherlands, Amsterdam -->
??? </mirror>
? </mirrors>
</settings>
?
還可以創建我們自己的倉庫,把中心倉庫里的東西全部拉下來,準備30個G的空間,差不多了,用下面這些命令
rsync -v -t -l -r mirrors.ibiblio.org::maven2 /your/local/path
rsync -v -t -l -r rsync://rsync.cica.es/maven2 /your/local/path
?
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的maven2——设置镜像篇的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Blueprint 使用手记
- 下一篇: XSD(Schema)教程