Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dependency 'org.springframework.boot:spring-boot-starter-web:2.3.0.RELEASE' not found

I am having a problem while creating a simple spring boot web application. I am building this app using Intellij Idea IDE. There is a issue arising related to the dependency. Intellij is saying - Dependency 'org.springframework.boot:spring-boot-starter-web:2.3.0.RELEASE' not found(in pom.xml).

Detailed Error Information:

Dependency 'org.springframework.boot:spring-boot-starter-web:2.3.0.RELEASE' not found.
Tag name: artifactId Description : The unique id for an artifact produced by the project group, e.g. maven-artifact. Version : 3.0.0+ 
<?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 https://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.3.0.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example</groupId>
    <artifactId>springboot-demo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>springboot-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>
            <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>
like image 353
Phoenix Avatar asked May 20 '20 09:05

Phoenix


2 Answers

I had a similar issue. Easiest fix is to Invalidate Caches and Restart

IntelliJ Idea Invalidate Caches and Restart

Maven will then re-sync your POM file after the restart. No need to make changes anywhere else.

Spring Boot 2.3.0.RELEASE

like image 183
Opatile Kelobang Avatar answered Sep 30 '22 16:09

Opatile Kelobang


If invalidate Caches / Restart... doesn't work, check Always update snapshots from "File -> Settings -> Building, Execution, Deployment -> Build Tools -> Maven". For me worked like a charm.

like image 22
Alexandru Baciu Avatar answered Sep 30 '22 16:09

Alexandru Baciu