我犯了一些错误:
失败:生成失败,出现异常。
Execution failed for task ':gisett-backend:compileJava'.
> Could not resolve all dependencies for configuration ':gisett-backend:detachedConfiguration1'.
> Could not resolve org.springframework.boot:spring-boot-dependencies:2.0.3.RELEASE.
Required by:
project :gisett-backend
> Could not resolve org.springframework.boot:spring-boot-dependencies:2.0.3.RELEASE.
> Could not get resource 'http://repo.boundlessgeo.com/main/org/springframework/boot/spring-boot-dependencies/2.0.3.RELEASE/spring-boot-dependencies-2.0.3.RELEASE.pom'.
> Could not HEAD 'http://repo.boundlessgeo.com/main/org/springframework/boot/spring-boot-dependencies/2.0.3.RELEASE/spring-boot-dependencies-2.0.3.RELEASE.pom'.
> No such host is known (repo.boundlessgeo.com)
> Could not resolve org.springframework.boot:spring-boot-dependencies:2.0.3.RELEASE.
> Could not get resource 'http://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-dependencies/2.0.3.RELEASE/spring-boot-dependencies-2.0.3.RELEASE.pom'.
> Could not HEAD 'http://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-dependencies/2.0.3.RELEASE/spring-boot-dependencies-2.0.3.RELEASE.pom'. Received status code 501 from server: HTTPS Required我怎么才能修好它?
更新:
它有部分帮助,现在我明白了:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':gisett-backend'.
> Could not resolve all artifacts for configuration ':gisett-backend:classpath'.
> Could not resolve io.spring.gradle:propdeps-plugin:0.0.9.RELEASE.
Required by:
project :gisett-backend
> Could not resolve io.spring.gradle:propdeps-plugin:0.0.9.RELEASE.
> Could not get resource 'https://repo.spring.io/libs-snapshot/io/spring/gradle/propdeps-plugin/0.0.9.RELEASE/propdeps-plugin-0.0.9.RELEASE.pom'.
> Could not HEAD 'https://repo.spring.io/libs-snapshot/io/spring/gradle/propdeps-plugin/0.0.9.RELEASE/propdeps-plugin-0.0.9.RELEASE.pom'. Received status code 401 from server: Unauthorized更新2:修复了它(我更新了服务器列表),但现在又出现了另一个错误:
配置项目‘:gisett-后端’出现了问题。
无法解析配置的所有工件‘:gisett-后端:classpath’。无法在以下位置找到搜索的io.spring.gradle:propdeps-plugin:0.0.9.RELEASE.:- https://repo.maven.apache.org/maven2/io/spring/gradle/propdeps-plugin/0.0.9.RELEASE/propdeps-plugin-0.0.9.RELEASE.pom - https://repo.spring.io/snapshot/io/spring/gradle/propdeps-plugin/0.0.9.RELEASE/propdeps-plugin-0.0.9.RELEASE.pom - https://plugins.gradle.org/m2/io/spring/gradle/propdeps-plugin/0.0.9.RELEASE/propdeps-plugin-0.0.9.RELEASE.pom
这是build.gradle的一部分:
buildscript {
ext {
springBootVersion = '2.0.1.BUILD-SNAPSHOT'
}
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/snapshot/' }
maven { url "https://plugins.gradle.org/m2/" }
//for finding propdeps-plugin dependency
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
classpath "com.moowork.gradle:gradle-node-plugin:1.2.0"
// classpath 'io.spring.gradle:propdeps-plugin:0.0.9.RELEASE'
}
}
//...
// In this section you declare where to find the dependencies of your project
repositories {
maven { url "https://repo.spring.io/plugins-release" }
//...
maven { url "https://repo.maven.apache.org/maven2" }
}
}
//...我怎么才能修好它?谢谢
发布于 2021-02-15 11:24:23
尝试更改您的build.gradle应该如下所示:
buildscript {
ext {
springBootVersion = '2.0.3.BUILD-SNAPSHOT'
}
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/libs-snapshot' }
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
}
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'https://stackoverflow.com/questions/66206973
复制相似问题