
课程咨询: 400-996-5531 / 投诉建议: 400-111-8989
认真做教育 专心促就业
昆明达内培训的小编教你怎么加快maven中jar包的下载速度。
maven下载jar包的默认仓库是#/repo/path速度较慢,通过配置国内镜像提高下载速度
1.打开eclipse--->Window--->Preferences--->选择Maven下的User Settings如图找到User Settings路径中的settings.xml文件
2.使用notepad++等文本编辑器打开文件进行修改
1 <mirrors>
2 <!-- mirror
3 Specifies a repository mirror site to use instead of a given repository. The repository that
4 this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
5 for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
6 <mirror>
7 <id>mirrorId</id>
8 <mirrorOf>repositoryId</mirrorOf>
9 <name>Human Readable Name for this Mirror.</name>
10 <url>#/repo/path</url>
11 </mirror>
12 -->
13
14 <mirror>
15 <id>alimaven</id>
16 <name>aliyun maven</name>
17 <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
18 <mirrorOf>central</mirrorOf>
19 </mirror>
20
21 <mirror>
22 <id>uk</id>
23 <mirrorOf>central</mirrorOf>
24 <name>Human Readable Name for this Mirror.</name>
25 <url>#/maven2/</url>
26 </mirror>
27
28 <mirror>
29 <id>CN</id>
30 <name>OSChina Central</name>
31 <url>#/content/groups/public/</url>
32 <mirrorOf>central</mirrorOf>
33 </mirror>
34
35 <mirror>
36 <id>nexus</id>
37 <name>internal nexus repository</name>
38 <!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>-->
39 <url>#/maven2</url>
40 <mirrorOf>central</mirrorOf>
41 </mirror>
42
43 </mirrors>
享受设置以后飞一般的感觉....