问题
I'm using Eclipse STS 3.9.7
The switch of Spring version creates other errors I'm able to solve, but not this one : first line of the pom.xml is tagged with "unkown" error.
Maven build (clean install) is running fine with no error no warnings.
What I've tried so far :
- Alt+F5 to update the project pom
- clean + build in eclipse
- close/reopen project
- close project/delete projet reimport project
- Close/reopen STS
- Delete project and all Eclipse metadata, then reimport as maven project.
When I switch back from 2.1.5 to 1.5.21, the error disappears instantly.
回答1:
After looking around, this is the solution :
It's an eclipse (or maven-jar-plugin) bug filed 2 days ago : https://bugs.eclipse.org/bugs/show_bug.cgi?id=547340
To solve the problem, downgrade maven-jar-plugin version from 3.1.2 to 3.1.1 through properties :
<properties>
(...)
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
</properties>
来源:https://stackoverflow.com/questions/56189383/unknown-error-in-pom-xml-when-i-upgrade-from-spring-1-5-21-to-2-1-5