Java – Project ‘org.springframework.boot:spring-boot-starter-parent:2.4.0’ not found

javamavenpom.xmlspringspring-boot

I am following this guide: https://spring.io/guides/gs/serving-web-content/,

<?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.4.0</version>
        <relativePath/>
    </parent>

    <groupId>org.example</groupId>
    <artifactId>plats-bruts</artifactId>
    <version>1.0-SNAPSHOT</version>

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

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

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <scope>runtime</scope>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
</dependencies>

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

</project>

but I have this problem on the pom:

Project 'org.springframework.boot:spring-boot-starter-parent:2.4.0' not found

but Its here https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent/2.4.0

Best Answer

I just ran into a similar problem. I'm using IntelliJ IDEA Ultimate 2020.2. The version number 2.4.0 was red and the message was the same as yours.

Selecting File -> Invalidate Caches / Restart... and choosing the Invalidate and Restart option fixed the issue. I guess it was just a stale cache.

Related Topic