我的一个本地版本有问题。我使用了spring初始值设定项来生成演示gradle项目。执行gradle bootRun
会导致以下错误:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'demo'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.1.6.RELEASE.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:2.1.6.RELEASE
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.1.6.RELEASE.
> Could not parse POM https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-gradle-plugin/2.1.6.RELEASE/spring-boot-gradle-plugin-2.1.6.RELEASE.pom
> Could not resolve org.springframework.boot:spring-boot-tools:2.1.6.RELEASE.
> Could not resolve org.springframework.boot:spring-boot-tools:2.1.6.RELEASE.
> Could not parse POM https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-tools/2.1.6.RELEASE/spring-boot-tools-2.1.6.RELEASE.pom
> Could not resolve org.springframework.boot:spring-boot-parent:2.1.6.RELEASE.
> Could not resolve org.springframework.boot:spring-boot-parent:2.1.6.RELEASE.
> Could not parse POM https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-parent/2.1.6.RELEASE/spring-boot-parent-2.1.6.RELEASE.pom
> Could not resolve org.springframework.boot:spring-boot-dependencies:2.1.6.RELEASE.
> Could not resolve org.springframework.boot:spring-boot-dependencies:2.1.6.RELEASE.
> Could not parse POM https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-dependencies/2.1.6.RELEASE/spring-boot-dependencies-2.1.6.RELEASE.pom
> Could not resolve org.springframework.data:spring-data-releasetrain:Lovelace-SR9.
> Could not resolve org.springframework.data:spring-data-releasetrain:Lovelace-SR9.
> Could not get resource 'https://plugins.gradle.org/m2/org/springframework/data/spring-data-releasetrain/Lovelace-SR9/spring-data-releasetrain-Lovelace-SR9.pom'.
> Could not HEAD 'https://repo.jfrog.org/artifactory/libs-release-bintray/org/springframework/data/spring-data-releasetrain/Lovelace-SR9/spring-data-releasetrain-Lovelace-SR9.pom?referrer'.
> 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. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
这似乎只是标准版本的问题,而不是快照。
答案 0 :(得分:0)
您应该升级gradle版本,目前可以升级到Gradle 5.5.1了