出现错误:
Description Resource Path Location Type Project build error: Non-resolvable parent POM for com.example:deviceManagement:0.0.1-SNAPSHOT: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.0.4.RELEASE from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.4.RELEASE from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and ‘parent.relativePath’ points at no local POM pom.xml /deviceManagement line 14 Maven pom Loading Problem
首先,确定自己eclipse中的maven配置完全正确。
然后cmd到出错的eclipse项目之下,然后使用 maven bin 目录下的 mvn 编译一下,完成之后右键项目 Maven——Update Project 即可。
例如:
cd c:\users\name\sts-projects\projectname
c:\programs\springsource\apache-maven-3.0.3\bin\mvn compile
最后在eclipse中,右键项目-> maven -> update projects -> 勾选“Force Update of Snapshots/Releases” -> OK即可。