maven3.5.4默认的中央仓库central地址是 http://repo.maven.apache.org/maven2/
但是网速一般,所以选择国内阿里云maven仓库
在settings.xml 中配置
<mirror>
<id>central</id>
<mirrorOf>central</mirrorOf>
<name>阿里云central库</name>
<url>https://maven.aliyun.com/repository/central</url>
</mirror>
<mirrorOf>是被拦截的仓库的id,被拦截的库将从镜像获取jar。这里我们拦截maven默认的中央库central。<mirrorOf>更高级的配置方式自己百度。
扫描二维码关注公众号,回复:
3920010 查看本文章