spring-boot-maven-plugin的jar包拉不下来

参考地址:

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>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章