1.将D:\apache-maven-3.2.1\conf 目录下的settings.xml文件复制到.m2文件夹中 
2.修改settings.xml文件, 在中添加以下代码:

点击(此处)折叠或打开

  1. <!-- 阿里云仓库 -->
  2.     <mirror>
  3.        <id>alimaven</id>
  4.        <mirrorOf>central</mirrorOf>
  5.        <name>aliyun maven</name>
  6.         <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
  7.      </mirror>

  8.     <!-- 中央仓库1 -->
  9.     <mirror>
  10.         <id>repo1</id>
  11.         <mirrorOf>central</mirrorOf>
  12.         <name>Human Readable Name for this Mirror.</name>
  13.         <url>http://repo1.maven.org/maven2/</url>
  14.      </mirror>
  15.     <!-- 中央仓库2 -->
  16.     <mirror>
  17.        <id>repo2</id>
  18.        <mirrorOf>central</mirrorOf>
  19.         <name>Human Readable Name for this Mirror.</name>
  20.        <url>http://repo2.maven.org/maven2/</url>
  21.     </mirror>


3.重启eclipse
--------------------- 
原文:https://blog.csdn.net/zdp072/article/details/79767189 

08-29 22:01