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>
I had a similar issue. Easiest fix is to Invalidate Caches and Restart
Maven will then re-sync your POM file after the restart. No need to make changes anywhere else.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With