Gradle Build failed - Could not resolve spring dependencies

25 Views Asked by At

I'm facing below issue when I import Gradle project into STS workspace. Below are the versions Java8, Gradle 7.1, Spring Boot 2.56

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'abc-service'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-buildpack-platform:2.5.6.
 Required by:
     project : > org.springframework.boot:org.springframework.boot.gradle.plugin:2.5.6 > org.springframework.boot:spring-boot-gradle-plugin:2.5.6
  > Could not resolve org.springframework.boot:spring-boot-buildpack-platform:2.5.6.
     > Could not get resource 'https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-buildpack-platform/2.5.6/spring-boot-buildpack-platform-2.5.6.pom'.
        > Could not GET 'https://jcenter.bintray.com/org/springframework/boot/spring-boot-buildpack-platform/2.5.6/spring-boot-buildpack-platform-2.5.6.pom'.
           > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve org.springframework.boot:spring-boot-loader-tools:2.5.6.
 Required by:
     project : > org.springframework.boot:org.springframework.boot.gradle.plugin:2.5.6 > org.springframework.boot:spring-boot-gradle-plugin:2.5.6
  > Could not resolve org.springframework.boot:spring-boot-loader-tools:2.5.6.
     > Could not get resource 'https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-loader-tools/2.5.6/spring-boot-loader-tools-2.5.6.pom'.
        > Could not GET 'https://jcenter.bintray.com/org/springframework/boot/spring-boot-loader-tools/2.5.6/spring-boot-loader-tools-2.5.6.pom'.
           > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve org.apache.commons:commons-compress:1.20.
 Required by:
     project : > org.springframework.boot:org.springframework.boot.gradle.plugin:2.5.6 > org.springframework.boot:spring-boot-gradle-plugin:2.5.6
  > Could not resolve org.apache.commons:commons-compress:1.20.
     > Could not get resource 'https://plugins.gradle.org/m2/org/apache/commons/commons-compress/1.20/commons-compress-1.20.pom'.
        > Could not HEAD 'https://jcenter.bintray.com/org/apache/commons/commons-compress/1.20/commons-compress-1.20.pom'.
           > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve org.springframework:spring-core:5.3.12.
 Required by:
     project : > org.springframework.boot:org.springframework.boot.gradle.plugin:2.5.6 > org.springframework.boot:spring-boot-gradle-plugin:2.5.6
  > Could not resolve org.springframework:spring-core:5.3.12.
     > Could not get resource 'https://plugins.gradle.org/m2/org/springframework/spring-core/5.3.12/spring-core-5.3.12.pom'.
        > Could not HEAD 'https://jcenter.bintray.com/org/springframework/spring-core/5.3.12/spring-core-5.3.12.pom'.
           > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
0

There are 0 best solutions below