由于众所周知的原因,maven的库在中国大陆非常慢。我在百度上搜到的大部分文章都是直接在~/.m2/settings.xml 加入以下内容 1 2 3 4 5 6 7 8 mirrors mirror idaliyunmaven/id mirrorOfcentral/mirrorOf nameali
由于众所周知的原因,maven的库在中国大陆非常慢。我在百度上搜到的大部分文章都是直接在~/.m2/settings.xml 加入以下内容
其实这样设置,我发现其实镜像并没有改变,还是maven的中央库。在maven库的官网上http://maven.apache.org/settings.html,是建议我们这样设置的。但是我发现,有时候,阿里云maven源有的包下载不了。所以我建议设置如果阿里云下载不了,就去下载中央库。所以我的设置如下:
还有一个令人困惑的是标签mirrorOf,根据maven官网解释 specify the mirror of setting that is the ID of the repository you are using a mirror of。这句话令人困惑,我猜的意思就是https://maven.aliyun.com/repository/central下的哪个仓库,如果是*号,就包含了所有仓库。比如看下图, |
2021-06-05
2021-05-27
2021-05-26
2021-06-05
2021-05-16