Project build error: Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Could not transf

使用eclipse插件sts搭建springboot项目遇到pom.xml文件中的标签报错提示:

Project build error: Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.2.6.RELEASE from/to mirrorId (http://central.maven.org/maven2/): central.maven.org an

 

 

解决办法:

1:先清空maven仓库中的内容

2:在maven的conf文件夹中的settings.xml文件中的mirrors标签中加入下面内容

3:在项目中右键选择maven==》update project ,选中Force Update of Snap...选项,等待一段时间(需要下载相关文件)
 




      

              repo2  

              central  

              spring2.0 for this Mirror.  

              https://repo.spring.io/libs-milestone  

          

          

          net-cn  

          central  

          Human Readable Name for this Mirror.  

          http://maven.net.cn/content/groups/public/   

          

          

              ui  

     

          central  

              Human Readable Name for this Mirror.  

             http://uk.maven.org/maven2/  

          

          

          ibiblio  

          central  

          Human Readable Name for this Mirror.  

         http://mirrors.ibiblio.org/pub/mirrors/maven2/  

          

          

              jboss-public-repository-group  

              central  

              JBoss Public Repository Group  

             http://repository.jboss.org/nexus/content/groups/public  

        

	 

  

 

你可能感兴趣的:(JAVA基础和工具类,Javaweb开发)