spring boot pom.xml Failure to transfer

Things to try

  1. You can try replacing your beginning <project> tag like below:-

<?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>
    <!-- Other stuff of the pom.xml here -->
</project>

  1. You need to remove <relativePath/> and the parent will look like below:-

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <!-- use your specific version here -->
    <version>2.0.0.RELEASE</version>
</parent>

  1. If still it is not resolving then it could be various things like:-

    1. internet connection, could be proxy issue also
    2. try deleting the folder M2_FOLDER_LOCATION\.m2\repository\org\springframework\boot\spring-boot-parent and then re importing the project.

I was facing the same problem. I followed the following steps:

  1. Right-click on the project and select Maven,
  2. Click on Update Project,
  3. Except Offline select every checkbox.

It should work fine now.


relativePath requires a path inside it like so:

<parent>
  <groupId>com.mycompany.app</groupId>
  <artifactId>my-app</artifactId>
  <version>1</version>
  <relativePath>../parent/pom.xml</relativePath>
</parent>

All you likely need to do is remove <relativePath/> and make your parent look like so:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.0.RELEASE</version>
</parent>