为什么从Spring Boot版本2.1.4更改为2.1.5会给出未知的配置Maven错误? [英] Why does change from Spring boot version 2.1.4 to 2.1.5 gives unknown configuration Maven error?
问题描述
我已经安装了Eclipse(实际上是Spring Tool Suite).它与Maven一起提供.我已经创建了Spring boot starter项目. Maven正在下载所有依赖项,并且一切正常.
I had installed Eclipse (actually Spring Tool Suite). It came with Maven. I had created Spring boot starter projects. Maven was downloading all the dependencies and things were working fine.
最近,我创建了一个新项目.这次,我注意到pom.xml中存在错误 问题窗口(在STS中)显示以下内容:
Recently, I created a new project. This time, I noticed an error in pom.xml and the problem window (in STS) showing the following:
Description Resource Path Location Type
Unknown pom.xml /TestSessionAttribute line 1 Maven Configuration Problem
我注意到spring boot版本是2.1.5(之前是2.1.4).
I noticed that the spring boot version was at 2.1.5 (it was 2.1.4 before).
<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>更新项目),并选中了强制更新快照/发布".这不能解决问题. 我确实看到了
I went ahead and did an update of the project (Maven > Update project) with the 'Force Update of Snapshots/Releases' checked. This did not resolve the problem. I do see the
spring-boot-2.1.5.RELEASE.jar
在m2存储库中.
我回过头,将版本更改为2.1.4,然后进行了Maven>更新项目,错误消失了.
I went back and changed the version to 2.1.4 and then a Maven > Update Project and the errors went away.
为什么版本为2.1.5时会出现Maven错误?
Why am I getting the Maven error when version is 2.1.5?
推荐答案
According to this link you can fix the issue by downgrading the maven-jar-plugin to 3.1.1 (from 3.1.2). I can confirm that the fix works for my own projects.
将以下条目添加到pom中以解决该问题.
Add the following entry to your pom to fix that issue.
<properties>
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
</properties>
还存在用于Eclipse的官方错误条目.
这篇关于为什么从Spring Boot版本2.1.4更改为2.1.5会给出未知的配置Maven错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!