今天用Maven跑项目时,遇到这样的问题:
Downloading from central: https://repo.maven.apache.org/maven2/…
原因:
所有自定义pom.xml都是继承自super pom,spuper pom中有如下内容:
central Central Repository http://repo.maven.apache.org/maven2 default false central Central Repository http://repo.maven.apache.org/maven2 default false never
故当maven下载资源时,会优先使用http://repo.maven.apache.org/maven2去下载。
解决方法:
在项目pom.xml的中添加:
alimaven https://maven.aliyun.com/repository/public alimaven https://maven.aliyun.com/repository/public



