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>

Comment From: bclozel

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?

Comment From: wilkinsona

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.

Comment From: Raghav-Github1989

Hello Everyone,

i have observed this problem with the latest version of Spring-boot like when you start with spring initializer for latest versions then this error comes in else with older version like 2.1.11 or 2.1.13, we are good to go.

i doubt there is some problem with the pom.xml files available for latest versions.

Thanks

Comment From: bclozel

@Raghav-Github1989 this issue was about a networking error. In your case it might be related to a corrupted cache entry. Did you try what was suggested in https://github.com/spring-projects/spring-boot/issues/14970#issuecomment-433332524 ?

Comment From: Raghav-Github1989

@bclozel i have tried following steps : - i tried to do a maven force update but didn't work. - i also tried both the commands but each throwing same error:

[INFO] Downloading: https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-parent/2.3.0.M4/spring-boot-starter-parent-2.3.0.M4.pom [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-resolvable parent POM for com.raghav:cityproject:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.3.0.M4 from/to spring-milestones (https://repo.spring.io/milestone): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at no local POM @ line 5, column 10

which looks like the repo pom is not parsable at some point and hence few dependencies are not downloaded, path for POM from logs : https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-parent/2.3.0.M4/spring-boot-starter-parent-2.3.0.M4.pom

i doubt if there is some certificate issue or something else over spring repo.

  • here is my dependency

Capture

Comment From: snicoll

@Raghav-Github1989 there's nothing we can do about that as it is an issue with either the proxy you're using or whatever certificates you've installed in your java runtime.

2.3.0.M4 resolves fine for me.

Comment From: krispant

the issue is still persist and no one is taking care of it

Comment From: wilkinsona

@krispant This issue was about a temporary network problem. There’s nothing that we can do to take care of it as it’s caused by infrastructure that’s out of our control. If there is a problem with your local network you may be able to take care of it yourself.

Comment From: krispant

@krispant This issue was about a temporary network problem. There’s nothing that we can do to take care of it as it’s caused by infrastructure that’s out of our control. If there is a problem with your local network you may be able to take care of it yourself.

I can access the maven repo by url so i dont think is there any issue with network but when i am doing maven clean or build from eclipse that time i am getting this issue, am i missing any configuration.. its simple hello world spring boot application created by spring initializer

Comment From: wilkinsona

@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.

Comment From: AbhishekMahi

@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.

@wilkinsona what about below one mate any idea? pom.xml is almost same as mentioned in this chain.

Step 3/37 : ADD ./pom.xml /application/pom.xml ---> 0b22d850663f Step 4/37 : RUN mvn clean install -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -DskipTests -f application/pom.xml ---> Running in 3d85e61244b4 [‌INFO‌Scanning for projects...‌ Downloading from tfs-gsk-com-platformproduct-rdip-artifacts-test: https://tfs.gsk.com/tfs/PlatformProduct/_packaging/rdip-artifacts-test/maven/v1/org/springframework/boot/spring-boot-starter-parent/1.5.3.RELEASE/spring-boot-starter-parent-1.5.3.RELEASE.pom Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/1.5.3.RELEASE/spring-boot-starter-parent-1.5.3.RELEASE.pom [‌ERROR‌[ERROR] Some problems were encountered while processing the POMs:‌ [FATAL] Non-resolvable parent POM for com.gsk:data-ws-Rancher-Test:0.10.0: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.3.RELEASE from/to tfs-gsk-com-platformproduct-rdip-artifacts-test (https://tfs.gsk.com/tfs/PlatformProduct/_packaging/rdip-artifacts-test/maven/v1): Not authorized and 'parent.relativePath' points at no local POM @ line 11, column 13 @ [‌ERROR‌The build could not read 1 project -> ‌[Help 1]‌ [‌ERROR‌ ‌ [‌ERROR‌ The project com.gsk:data-ws-Rancher-Test:0.10.0 (/application/pom.xml) has 1 error‌ [‌ERROR‌ Non-resolvable parent POM for com.gsk:data-ws-Rancher-Test:0.10.0: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.3.RELEASE from/to tfs-gsk-com-platformproduct-rdip-artifacts-test (https://tfs.gsk.com/tfs/PlatformProduct/_packaging/rdip-artifacts-test/maven/v1): Not authorized and 'parent.relativePath' points at no local POM @ line 11, column 13 -> ‌[Help 2]‌ [‌ERROR‌ [‌ERROR‌To see the full stack trace of the errors, re-run Maven with the ‌-e‌witch.‌ [‌ERROR‌Re-run Maven using the ‌-X‌witch to enable full debug logging.‌ [‌ERROR‌ [‌ERROR‌For more information about the errors and possible solutions, please read the following articles:‌ [‌ERROR‌[Help 1]‌ttp://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException‌ [‌ERROR‌[Help 2]‌ttp://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException‌ The command '/bin/sh -c mvn clean install -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -DskipTests -f application/pom.xml' returned a non-zero code: 1

[error]The command '/bin/sh -c mvn clean install -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -DskipTests -f application/pom.xml' returned a non-zero code: 1

[error]/bin/docker failed with return code: 1

[section]Finishing: Build an image

Comment From: snicoll

@AbhishekMahi as mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Please ask questions on StackOverflow. The error involves a private repository instance that you may want to look at, i.e. https://tfs.gsk.com/tfs/PlatformProduct/_packaging/rdip-artifacts-test/maven/v1

Comment From: Walters-Marissa

@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.

Going to go ahead and say this issue is definitely valid. 5xx errors A, come from the server, IE yours, not mine, and B, this is literally the first and only result that happens in google when you hand it this error for your project. Now, I'm not saying that this is your actual error and you need to fix it, but rather, stating it has anything to do with the local network is preposterous and will only send users on wild goose chases. This is definitely down to misconfigurations in the pom.xml file. One I'm not really suited to solving since I am a beginner, and probably has to do with the latest changes to your repository interacting poorly with 5 year old code. I've received a 501 error at least one time, and it's probably related at least partially to https. There is no network/firewall issue here and, given that even adding https to some of the embedded xml links broke pathing and produced some of these errors, I really suspect that there are problems in the original users pom.xml

Since this is the first result in google search I'm going to link to the solution that worked to me to help others on the right path. It's unfortunate if you don't want to be receiving these kinds of messages, but in that case, I would wholly recommend deleting or hiding this issue since a first result practically guarantees a flood of confused users entering to figure out deployment related problems.

<pluginRepositories>
        <pluginRepository>
            <id>central</id>
            <name>Central Repository</name>
            <url>https://repo.maven.apache.org/maven2</url>
            <layout>default</layout>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <updatePolicy>never</updatePolicy>
            </releases>
        </pluginRepository>
    </pluginRepositories>
    <repositories>
        <repository>
            <id>central</id>
            <name>Central Repository</name>
            <url>https://repo.maven.apache.org/maven2</url>
            <layout>default</layout>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

https://stackoverflow.com/questions/59763531/maven-dependencies-are-failing-with-a-501-error

Comment From: wilkinsona

@Walters-Marissa Thanks for trying to help, but Maven Central isn't our server. It's maintained by a company called Sonatype who have published an article that explains how to monitor its status and diagnose connectivity problems.

stating it has anything to do with the local network is preposterous and will only send users on wild goose chases

This isn't preposterous. It's entirely possible that a local network problem would cause connectivity problems with a remote server.

This is definitely down to misconfigurations in the pom.xml file

This also isn't the case. It's possible that misconfiguration is the problem, but numerous other causes are also possible.

I'm going to link to the solution that worked to me to help others on the right path

I don't think this is the right path. With an up-to-date Maven installation this configuration should not be necessary as the Central Repository using an HTTPS connection is part of the default configuration.

Comment From: wilkinsona

Anyone having problems downloading artifacts from Maven Central, please refer to Sonatype's problem diagnosis guide.

Comment From: Walters-Marissa

@Walters-Marissa Thanks for trying to help, but Maven Central isn't our server. It's maintained by a company called Sonatype who have published an article that explains how to monitor its status and diagnose connectivity problems.

stating it has anything to do with the local network is preposterous and will only send users on wild goose chases

This isn't preposterous. It's entirely possible that a local network problem would cause connectivity problems with a remote server.

This is definitely down to misconfigurations in the pom.xml file

This also isn't the case. It's possible that misconfiguration is the problem, but numerous other causes are also possible.

I'm going to link to the solution that worked to me to help others on the right path

I don't think this is the right path. With an up-to-date Maven installation this configuration should not be necessary as the Central Repository using an HTTPS connection is part of the default configuration.

If you are suggesting that this error is inherent to the version of maven then you guys are the ones who created this problem. I wont waste more of my breath telling you you are wrong though. Continue to waste your time holding your ears closed instead of fixing something that is guaranteed to attract more attention you already said you didn't want.