2 votes

Spring Boot + Maven: Project build error: Non-resolvable parent POM

I am creating a Spring Boot project using the Spring Starter Project. At first I did it normally a couple of times a few days ago. Today I try it again and I find this error.

introducir la descripción de la imagen aquí

The description of the error is this:

Project build error: Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:1.5.15.RELEASE from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.15.RELEASE from/to central ( https://repo.maven.apache.org/maven2 ): connect timed out and 'parent.relativePath' points at no local POM

There are similar questions that suggest you do this:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.15.RELEASE</version>
    <relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
</parent>

But nothing happens. And in general I don't understand the error (what it refers to). Please I need you to shed some light on it. Thanks in advance.

2voto

GeanOrtegaDev Points 21

I just solved the problem thanks to the above comment: Yes, I deduce that the problem is because the MAVEN server presents some failure... since when creating the project THE PON FILE is created with version 2.2.2(IN MY CASE):

Version that exists since it is not downloaded

When we go to the next route of our equipment:

C:\Users\USUARIO\.m2\repository\org\springframework\boot\spring-boot-starter

We will find the available versions .... in my case I found (2.1.8 - 2.2.0 - 2.2.1) as we see there is no version 2.2.2 that appears in the PON file of my project

The solution

  • In the PON file I changed to version 2.2.1 (2.2.1.RELEASE)

Since it is the most recent one available on my PC

1voto

SJuan76 Points 7859

What the message tells you is that Maven went to download a dependency (in this case the parent and could not find it).

It could be due to any punctual thing (connection failure, server down, etc.); the point is that by default, Maven does not retry to download the dependencies again until after a while, so you get the same thing.

Options:

  • Run maven with the -U which forces the update of dependencies.

  • Search for the local maven repository (at $HOME/.m2/repository ), find the folder org/springframework/boot/spring-boot-starter-parent and delete it, so that it does not find the dependency locally and try to load it again. More work, but it won't try to update ALL the dependencies you have.

HolaDevs.com

HolaDevs is an online community of programmers and software lovers.
You can check other people responses or create a new question if you don't find a solution

Powered by:

X