1.提高Maven下载jar包的速度
打开项目所配置的maven包下conf目录下的settings.xml
找到 <mirrors>标签添加一下内容:
1 <!-- 阿里云仓库 -->
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror> <!-- *仓库1 -->
<mirror>
<id>repo1</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo1.maven.org/maven2/</url>
</mirror> <!-- *仓库2 -->
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2/</url>
</mirror>
重启之后试一试下载的速度
2.自定义maven本地仓库
找到settings.xml中的<localRepository>节点,修改为你的只定义路径。如图所示:
如果是idea工具,可直接设置