Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Tool Suite Maven Configuration Problem

I am trying to import project in STS 4 & Eclipse Oxygen which is created using start.spring.io. Below is pom.xml

<?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.eureka</groupId>
    <artifactId>EurekaRegistry</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>EurekaRegistry</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
        <spring-cloud.version>Greenwich.SR1</spring-cloud.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
        </dependency>

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

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

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

</project>

I am getting below error.

Error

Below things I tried.

  1. Update Maven Project
  2. Project Clean & Build
  3. Check proper Java version is configured.

Still I am not able to resolve this. Any help is appreciated.

like image 964
Aditya Ekbote Avatar asked Dec 05 '22 09:12

Aditya Ekbote


1 Answers

That's a bug on Eclipse, as you can see here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=547340

I fixed by adding this property to my pom.xml

<properties>
    <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
</properties>
like image 178
Raphael Amoedo Avatar answered Dec 22 '22 22:12

Raphael Amoedo