Getting unknown error at Line 1 in pom.xml
in Eclipse IDE.
It was working fine till yesterday, but all of a sudden after updating my project from master and aft
same problem for me, original code from spring starter demo gives unknown error on line 1:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
...
Changing just the version of 2.1.6.RELEASE to 2.1.4.RELEASE fixes the problem.
As per the suggestion from @Shravani, in my pom.xml file, I changed my version number in the area from this:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.5.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
to this:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
I then right clicked on the project and did a 'Maven -> Update project...'. This made the problem go away for me.
Add <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version> in property tag
problem resolve
https://medium.com/@saannjaay/unknown-error-in-pom-xml-66fb2414991b
whenever you facing this type of error simply change the Release version just like In my case it is showing Error in 2.2.7 I changed to 2.2.6
Problem:
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.7.RELEASE</version>
Solution:
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.6.RELEASE</version>
There is a bug about Eclipse and spring-boot-starter-parent 2.1.5
"if the maven packaging attribute is war then no problem.The problem is in jar type." So you can also fix this problem by changing packaging type.
<packaging>war</packaging>
I was getting same error in Version 3. It worked after upgrading STS to latest version: 4.5.1.RELEASE. No change in code or configuration in latest STS was required.