I am creating a Spring Boot project using the Spring Starter Project. I initially did it normally a couple of times a few days ago. Today I try again and encounter this error.
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 non-local POM
There are similar questions that suggest I 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 do not understand the error (to which it refers). Please I need you to shed some light on me. Thanks in advance.
I just solved the problem thanks to the comment above: Yes, I deduce that the problem is because the MAVEN server has a bug... 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
By heading to the following path from our team:
We will find the available versions...in my case I found (2.1.8 - 2.2.0 - 2.2.1) as we can see there is no version 2.2.2 that appears in the PON file of my project
The solution
Since it is the most recent available on my PC
What the message tells you is that Maven went to download a dependency (in this case the
parent
and couldn't find it).It could be due to any punctual thing (connection failure, server down, etc.); The thing is that by default, Maven doesn't try to download the dependencies again until some time has passed, so you get the same thing.
Options:
Run maven with the option
-U
to force update dependencies.Find the local maven repository (in
$HOME/.m2/repository
), find the folderorg/springframework/boot/spring-boot-starter-parent
and delete it, so it doesn't find the dependency in local and try to load it again. More work, but it won't try to update EVERY dependency you have.