spring boot pom.xml Failure to transfer
Things to try
- 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>
- 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>
If still it is not resolving then it could be various things like:-
- internet connection, could be proxy issue also
- 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:
- Right-click on the project and select Maven,
- Click on Update Project,
- 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>