使用STS创建Spring boot project报错:Project build error: Non-resolvable parent POM for...

使用Spring Tool Suite,按照向导创建Spring boot starter project,结果,报错。

Description Resource    Path    Location    Type
Project build error: Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.0.0.M5 from https://repo.spring.io/snapshot was cached in the local repository, resolution will not be reattempted until the update interval of spring-snapshots has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.0.M5 from/to spring-snapshots (https://repo.spring.io/snapshot): connect timed out and 'parent.relativePath' points at no local POM   pom.xml /demo   line 14 Maven pom Loading Problem

错误指向POM.xml的Parent节点。

详细查看错误提示,发现为TIME OUT。因此,需要重新触发Maven的Update。

解决方案步骤:

(1)工程–》右键–》Maven–》Update Project…

使用STS创建Spring boot project报错:Project build error: Non-resolvable parent POM for..._第1张图片

(2)取消offline选项,选择Force Update of Snapshots/Releases,OK

使用STS创建Spring boot project报错:Project build error: Non-resolvable parent POM for..._第2张图片

同步后,问题解决。

你可能感兴趣的:(Tips,Android,Tips)