当前位置:   article > 正文

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

project build error: non-resolvable parent pom for com.example:demo:0.0.1-sn

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

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...选项,等待一段时间(需要下载相关文件)
 

  1. <mirrors>
  2. <mirror>
  3. <id>repo2</id>
  4. <mirrorOf>central</mirrorOf>
  5. <name>spring2.0 for this Mirror.</name>
  6. <url>https://repo.spring.io/libs-milestone</url>
  7. </mirror>
  8. <mirror>
  9. <id>net-cn</id>
  10. <mirrorOf>central</mirrorOf>
  11. <name>Human Readable Name for this Mirror.</name>
  12. <url>http://maven.net.cn/content/groups/public/</url>
  13. </mirror>
  14. <mirror>
  15. <id>ui</id>
  16. <mirrorOf>central</mirrorOf>
  17. <name>Human Readable Name for this Mirror.</name>
  18. <url>http://uk.maven.org/maven2/</url>
  19. </mirror>
  20. <mirror>
  21. <id>ibiblio</id>
  22. <mirrorOf>central</mirrorOf>
  23. <name>Human Readable Name for this Mirror.</name>
  24. <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>
  25. </mirror>
  26. <mirror>
  27. <id>jboss-public-repository-group</id>
  28. <mirrorOf>central</mirrorOf>
  29. <name>JBoss Public Repository Group</name>
  30. <url>http://repository.jboss.org/nexus/content/groups/public</url>
  31. </mirror>
  32. </mirrors>

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/451392
推荐阅读
相关标签
  

闽ICP备14008679号