Non-resolvable parent POM: Could not transfer artifact org.springframework.boot

Viewed 62662

I am creating simple spring boot web application I am using the project generated by spring Initializer

I have set my JDK and maven in the path Also done setting for JAVA_HOME

While running the application getting following error

Non-resolvable parent POM: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.3.RELEASE from/to central (http://repo.maven.apache.org/maven2): This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server (repo.maven.apache.org) and 'parent.relativePath' points at no local POM @ line 14, column 10 -> [Help 2]

following is my POM in the project

<?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.iot.tme</groupId>
<artifactId>PowerBIDemo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

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

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.3.RELEASE</version>
    <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</artifactId>
    </dependency>


</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>
</project>
7 Answers

try to update maven dependencies by hands mvn dependency:purge-local-repository.

Incase you're working for an organisation and need VPN to work. You must connect to VPN before downloading the dependencies. This is what resolved my issue.

In my case, I was using wrong JDK version (1.7) and changing it to (1.8) worked.

For me what worked was that I downloaded the cacerts file provided in the same repository and stored that in the JAVA_HOME/jre/lib/security folder and then I right clicked the Project in the Package Explorer view of Eclipse, Project -> Maven -> Update Project (Alt+F5), and after that it started downloading the dependencies, from the various repos which were unreachable earlier, and later the problem got resolved.

I changed jdk 1.7 to jdk 1.8 and It worked and Don't forget also update your environment variables.

i have already answered it here. try deleting the dependencies in .m2 and update and clean.

and also check the settings.xml is properly configured in window-->preferences-->maven-->User Settings.

For me it work by changing option settings of Netbeans. Tools > Options > Team > Maven > Maven Home

Update by downloading maven manually from original website check maven by using mvn -v. extra inst.(http://maven.apache.org/install.html)

Once Maven is installed, add the maven directory to Maven Home:

Tools > Options > Team > Maven > Maven Home

Related