我使用
./gradlew format clean publishToMavenLocal -x test &\> log
构建了 spring-boot 3
源代码。
它失败了:
- 等待上班的工人:4人
- 停止工人:1
失败:构建失败并出现异常。
出了什么问题:运行工作无法取得进展。有项目排队等待执行,但都无法启动
尝试:
使用 --stacktrace 选项运行以获取堆栈跟踪。 使用 --info 或 --debug 选项运行以获得更多日志输出。
- 在 https://help.gradle.org
获取更多帮助此构建中使用了已弃用的 Gradle 功能,使其成为 与 Gradle 8.0 不兼容。
您可以使用“--warning-mode all”来显示个别弃用 警告并确定它们是否来自您自己的脚本或插件。
见 https://docs.gradle.org/7.6.3/userguide/command_line_interface.html#sec:command_line_warnings
已禁用 96 个无效单元的执行优化 在此构建期间进行工作以确保正确性。请咨询 弃用警告了解更多详细信息。
在 6m 11s 内构建失败 801 个可操作任务:798 个已执行,1 个来自 缓存,2 个最新
构建扫描未发布,因为您尚未通过身份验证 服务器“ge.spring.io”。欲了解更多信息,请参阅 https://gradle.com/help/gradle-authentication-with-gradle-enterprise。
我搜索过这个问题,但好像没有人遇到过。
构建.gradle
plugins {
id "base"
id "org.jetbrains.kotlin.jvm" apply false // https://youtrack.jetbrains.com/issue/KT-30276
id "io.spring.nohttp" version "0.0.11"
}
description = "Spring Boot Build"
defaultTasks 'build'
nohttp {
allowlistFile = project.file("src/nohttp/allowlist.lines")
source.exclude "**/bin/**"
source.exclude "**/build/**"
source.exclude "**/out/**"
source.exclude "**/target/**"
source.exclude "**/.settings/**"
source.exclude "**/.classpath"
source.exclude "**/.project"
source.exclude "spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/docker/export.tar"
}
check {
dependsOn checkstyleNohttp
}
allprojects {
group "org.springframework.boot"
repositories {
mavenCentral()
if (version.contains('-')) {
maven { url "https://repo.spring.io/milestone" }
}
if (version.endsWith('-SNAPSHOT')) {
maven { url "https://repo.spring.io/snapshot" }
}
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, "minutes"
}
}
tasks.named("checkstyleNohttp").configure {
maxHeapSize = "1536m"
}
openjdk 版本“17-internal”2021-09-14 OpenJDK 运行时环境(构建 17-internal+0-adhoc.root.crac) OpenJDK 64 位服务器虚拟机(构建 17-internal+0-adhoc.root.crac,混合模式,共享)
------------------------------------------------- ----------- Gradle 7.6.4 ----------------------------------- ------------------------- 构建时间:2024-02-05 14:29:18 UTC 修订版:e0bb3fc8cefad8432c9033cdfb12dc14facc9dd9 Kotlin:1.7.10 Groovy:3.0 .13 Ant:Apache Ant(TM) 版本 1.10.13 于 2023 年 1 月 4 日编译 JVM:17-internal (Oracle Corporation 17-internal+0-adhoc.root.crac) 操作系统:Linux 5.15.0-051500-generic amd64
我成功地构建了它,跳过了更多任务
./gradlew clean build -x test -x intTest -x systemTest -x downloadJdk
....
BUILD SUCCESSFUL in 1m 53s
3283 actionable tasks: 2001 executed, 636 from cache, 646 up-to-date
我的环境
$ ./gradlew -version
------------------------------------------------------------
Gradle 7.6.4
------------------------------------------------------------
Build time: 2024-02-05 14:29:18 UTC
Revision: e0bb3fc8cefad8432c9033cdfb12dc14facc9dd9
Kotlin: 1.7.10
Groovy: 3.0.13
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM: 17 (Oracle Corporation 17+35-2724)
OS: Linux 6.5.0-28-generic amd64