我已经安装了Eclipse(实际上是Spring Tool Suite)。它与Maven一起提供。我已经创建了Spring boot
starter项目。Maven正在下载所有依赖项,并且一切正常。
最近,我创建了一个新项目。这次,我注意到pom.xml中出现错误,并且问题窗口(在STS中)显示以下内容:
Description Resource Path Location Type
Unknown pom.xml /TestSessionAttribute line 1 Maven Configuration Problem
我注意到spring boot版本是2.1.5(之前是2.1.4)。
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.5.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
我继续进行了项目的更新(Maven>更新项目),并选中了“强制更新快照/发布”。这不能解决问题。我确实看到了
spring-boot-2.1.5.RELEASE.jar
在m2存储库中。
我回过头来,将版本更改为2.1.4,然后执行了Maven>更新项目,错误消失了。
为什么在版本2.1.5时出现Maven错误?