Sunday, January 6, 2019

Eclipse and STS build error importing Gradle project

Issue


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'warehouse'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.1.1.RELEASE.
     Required by:
         project :
      > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.1.1.RELEASE.
         > Could not parse POM https://jcenter.bintray.com/org/springframework/boot/spring-boot-gradle-plugin/2.1.1.RELEASE/spring-boot-gradle-plugin-2.1.1.RELEASE.pom
            > Could not resolve org.springframework.boot:spring-boot-tools:2.1.1.RELEASE.
               > Could not resolve org.springframework.boot:spring-boot-tools:2.1.1.RELEASE.
                  > Could not parse POM https://jcenter.bintray.com/org/springframework/boot/spring-boot-tools/2.1.1.RELEASE/spring-boot-tools-2.1.1.RELEASE.pom
                     > Could not resolve org.springframework.boot:spring-boot-parent:2.1.1.RELEASE.
                        > Could not resolve org.springframework.boot:spring-boot-parent:2.1.1.RELEASE.
                           > Could not parse POM https://jcenter.bintray.com/org/springframework/boot/spring-boot-parent/2.1.1.RELEASE/spring-boot-parent-2.1.1.RELEASE.pom
                              > Could not resolve org.springframework.boot:spring-boot-dependencies:2.1.1.RELEASE.
                                 > Could not resolve org.springframework.boot:spring-boot-dependencies:2.1.1.RELEASE.
                                    > Could not parse POM https://jcenter.bintray.com/org/springframework/boot/spring-boot-dependencies/2.1.1.RELEASE/spring-boot-dependencies-2.1.1.RELEASE.pom
                                       > Could not resolve org.springframework.data:spring-data-releasetrain:Lovelace-SR3.
                                          > Could not resolve org.springframework.data:spring-data-releasetrain:Lovelace-SR3.
                                             > Could not get resource 'https://jcenter.bintray.com/org/springframework/data/spring-data-releasetrain/Lovelace-SR3/spring-data-releasetrain-Lovelace-SR3.pom'.
                                                > Could not HEAD 'https://jcenter.bintray.com/org/springframework/data/spring-data-releasetrain/Lovelace-SR3/spring-data-releasetrain-Lovelace-SR3.pom'.
                                                   > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

CONFIGURE FAILED in 26s



Solution

Set Gradle installation directory to STS - Spring Tool Suite

"Window" --> "Preferences"  ( Go to "Preferences" in "Window" menu )
Select "Gradle" ( If cannot find , type 'gradle' in top left corner search tab
Add Local Installation directory -> your gradle installation directory

No comments:

Post a Comment