參考地址:
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>