参考地址:
https://developer.aliyun.com/mvn/guide
spring-boot-maven-plugin不在central仓库,而是在grail-core仓库中,需要把<mirrorOf>central</mirrorOf>改成<mirrorOf>*</mirrorOf>。
修改maven的配置文件settings.xml:
在<mirrors></mirrors>标签中添加 mirror 子节点
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共仓库</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
如果想使用其它代理仓库,可在<repositories></repositories>节点中加入对应的仓库使用地址。以使用 central 代理仓为例:
<repository>
<id>central</id>
<url>https://maven.aliyun.com/repository/central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>