背景:
出错如下
出错原因是2020年1月起maven只支持https请求。
解决方法:
在maven的settings.xml的mirrors标签中改为如下内容(即阿里云的仓库):
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
重新执行maven命令即可。