欢迎关注并支持我的个人博客:codingshen.com
由于原本默认的Maven源下载特别慢,本文记录了更换maven源的方法
首先找到maven的安装目录下的配置文件:
(homebrew安装目录如下:/opt/homebrew/Cellar/maven/3.8.6/libexec/conf/settings.xml)
找到mirror
<mirror>
<id>maven-default-http-blocker</id>
<mirrorOf>external:http:*</mirrorOf>
<name>Pseudo repository to mirror external repositories initially using HTTP.</name>
<url>http://0.0.0.0/</url>
<blocked>true</blocked>
</mirror>
更换成如下源:
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>