项目中引用了spring-boot-starter-parent,但是一直都更新不下来。因为我用的我们公司自己的仓库,
这时候要把默认的中央仓库添加在setting.xml里就可以了
<!-- 加入默认的远程库-->
<repository>
<id>central</id>
<name>Central Repository</name>
<url>http://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
但是加上之后还是更新不下来,原来仓库更新是由顺序的,在有好几个远程仓库的情况下,从文件最上边开始找。
所以要把默认的仓库加在我们公司的仓库的前边。坑啊~~
----------------------------------------------------------------------------------------------------
然后又遇到了新的问题
pom.xml文件报错
Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.5:runtime Cause: error in opening zip file
查到原因是因为JAR包版本太低,之前是1.5.12的,但是maven.plugins的版本并不是由自己的配置决定的,它是由springboot的版本决定的,这时候只要修改springboot的版本,然后重新下载就好了