Lasa
Lasa

Reputation: 31

Why does pom.xml file give an unknown error

I,m trying to learn spring boot and install spring boot to eclipse IDE. When I create my first project it shows an error in first line of pom.xml. It shows as unknown error.

I tried many solutions from stackoverflow. But none of them work for me.

Maven pom.xml error in eclipse When maven says "resolution will not be reattempted until the update interval of MyRepo has elapsed", where is that interval specified?

My pom.xml as below.

 <?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.5.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demo</name>
<description>Demo project for Spring Boot</description>

<properties>
    <java.version>1.8</java.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

</project>

Can anyone help me for resolve this.

Upvotes: 0

Views: 6340

Answers (1)

Andrew Kim
Andrew Kim

Reputation: 56

I got the same problem 2 weeks ago. Then, I fixed it with adding a line as below

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

And it seems the error was fixed in Eclipse already.
Just update your Eclipse or STS4. You may see m2e connector is involved in the update list.

Upvotes: 4

Related Questions