Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
257 views
in Technique[技术] by (71.8m points)

java - Why does change from Spring boot version 2.1.4 to 2.1.5 gives unknown configuration Maven error?

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.

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

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>

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

in the m2 repository.

I went back and changed the version to 2.1.4 and then a Maven > Update Project and the errors went away.

Why am I getting the Maven error when version is 2.1.5?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

Add the following entry to your pom to fix that issue.

<properties>
    <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
</properties>

An official bug entry for eclipse exists as well.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...