在C:\Users\Administrator\.m2\文件夹中的settings.xml文件中添加如下内容,如果没有settings.xml文件新建一个
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<mirrors>
<mirror>
<id>maven.net.cn</id>
<name>one of the central mirrors in china</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
本文详细介绍如何在settings.xml文件中配置Maven的镜像源,以加速项目的依赖下载。通过添加阿里云和OSS镜像,实现对中国地区的优化。
9004

被折叠的 条评论
为什么被折叠?



