Dependency 'org.springframework.boot:spring-boot-starter-data-jpa:2.5.3' not found

Viewed 2529

I am new to spring boot and just started exploring it .I came across this issue where intellij ide shows this error in pom.xml .I fail to understand as to why this is happening.

<?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.5.3</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example</groupId>
    <artifactId>Spring-boot-tutorial</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>Spring-boot-tutorial</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>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>runtime</scope>
        </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-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <version>2.5.3</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

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

            </plugin>
        </plugins>
    </build>

</project>

It will be really helpful if someone can enlighten as to how these dependencies issues happen in spring boot and how they can be traced. Note i had a similar issue with spring-boot-maven-plugin so i just added the version code below it to make it work .The same addition of the version didn't work for spring-boot-starter-data-jpa.

1 Answers

Reloading the project might help. Steps

  1. Right click on the project
  2. Go to the "maven" option
  3. Click on "Reload Project"
Related