Preet Saloni
Preet Saloni

Reputation: 31

Getting Project 'org.springframework.boot:spring-boot-starter-parent:2.6.0-SNAPSHOT' not found

I am trying to create a spring boot project in IntelliJ Idea. I tried creating a project from Spring initializr. But when I unzip it and run it on my IDE, it keeps repeating the same error:

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

Tried using other versions of Spring Boot, but still the same error. I have also tried solutions provided on other posts earlier, but none of them work for me.

my pom.xml file

<?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.6.0-SNAPSHOT</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.upgrad</groupId>
    <artifactId>demoApp</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>demoApp</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>16</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>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <repositories>
        <repository>
            <id>spring-milestones</id>
            <name>Spring Milestones</name>
            <url>https://repo.spring.io/milestone</url>

        </repository>
        <repository>
            <id>spring-snapshots</id>
            <name>Spring Snapshots</name>
            <url>https://repo.spring.io/snapshot</url>

        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>spring-milestones</id>
            <name>Spring Milestones</name>
            <url>https://repo.spring.io/milestone</url>

        </pluginRepository>
        <pluginRepository>
            <id>spring-snapshots</id>
            <name>Spring Snapshots</name>
            <url>https://repo.spring.io/snapshot</url>

        </pluginRepository>
    </pluginRepositories>

</project>

Thanks!

Upvotes: 3

Views: 4646

Answers (3)

zz64
zz64

Reputation: 51

Try to clean your local maven repository. Mine was corrupted and the following lines solved the problem :

rm -rf ~/.m2/repository
rm -rf ~/.m2/wrapper

Upvotes: 2

try the version 2.2.6.RELEASE, worked for me.

Upvotes: 0

vaibhavsahu
vaibhavsahu

Reputation: 682

Spring Boot Starter Parent -> version 2.6.0-SNAPSHOT does not exist

enter image description here

Upvotes: 1

Related Questions