spring-boot: Project build error: Non-resolvable parent POM for spring-boot-starter-parent:pom:2.0.6.RELEASE

I’ve created a demo project in Spring Tool Suite 3.9.6.RELEASE.

In POM.xml, I’m getting the below error:

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:2.0.6.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:2.0.6.RELEASE from/to central (https://repo.maven.apache.org/maven2): connect timed out and 'parent.relativePath' points at wrong local POM

when I ran maven clean, it is generating the build errors:

The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.example:demo:0.0.1-SNAPSHOT (C:\ws\demo\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.6.RELEASE from/to central (https://repo.maven.apache.org/maven2): connect timed out and 'parent.relativePath' points at no local POM @ line 14, column 10 -> [Help 2]
[ERROR] 
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>com.example</groupId>
	<artifactId>demo</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>war</packaging>

	<name>demo</name>
	<description>Demo project for Spring Boot</description>

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

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<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-tomcat</artifactId>
			<scope>provided</scope>
		</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>


</project>

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

The original log shows that the attempt to connect to https://repo.maven.apache.org/maven2 timed out. This is a, presumably temporary, network problem. I’m going to close this one as there’s nothing we can do in Spring Boot to address problems with Maven establishing a network connection to Maven Central.

@krispant That may be a problem with your Maven installation’s network configuration not being the same as your browser’s. For example, your network may require the use of a proxy that’s configured in your browser and not in Maven. Unfortunately, none of these are things that we can solve for you as they are out of our control.

If you’re still having problems, I would recommend asking a question on Stack Overflow that describes your Maven configuration in detail and includes the entire output of the failure.

Spring Boot 2.0.6.RELEASE is available on maven central.

This looks like a setup issue, maybe a network problem?

Also, I think your POM should look like this:

<relativePath/> <!-- lookup parent from repository -->

Could you try and create a new project on start.spring.io, and run ./mvnw dependency:purge-local-repository and then ./mvnw spring-boot:run?