I download "spring-boot-3.0.1.zip" file and unzip, then execute .\gradlew build command. Eventually fail.
PS F:\JavaProject\spring-boot-3.0.1> .\gradlew build
> Task :spring-boot-project:spring-boot-devtools:checkFormatIntTest FAILED
> Task :spring-boot-project:spring-boot-docs:checkFormatMain FAILED
> Task :spring-boot-project:spring-boot-actuator-autoconfigure:checkFormatMain FAILED
<-------------> 2% EXECUTING [5m 9s]
> IDLE
> IDLE
> IDLE
> IDLE
> IDLE
> :spring-boot-project:spring-boot-dependencies:generateEffectiveBom
> IDLE
> IDLE
> IDLE
> IDLE
> IDLE
> IDLE
Comment From: wilkinsona
That's to be expected on Windows as the line endings will be incorrect. We recommend cloning the source using Git instead. Git should be configured with core.autocrlf=true.
Comment From: xiaoyaobishizhe
I have used Git, but still fail.
PS F:\JavaProject> git config --global core.autocrlf true
PS F:\JavaProject> git clone https://github.com/spring-projects/spring-boot.git
Cloning into 'spring-boot'...
remote: Enumerating objects: 773967, done.
remote: Counting objects: 100% (252/252), done.
remote: Compressing objects: 100% (142/142), done.
remote: Total 773967 (delta 59), reused 191 (delta 38), pack-reused 773715
Receiving objects: 100% (773967/773967), 156.35 MiB | 2.66 MiB/s, done.
Resolving deltas: 100% (344136/344136), done.
error: unable to create file spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/NativeImagePluginActionIntegrationTests-classesGeneratedDuringAotTestProcessingAreOnTheTestNativeImageClasspath.gradle: Filename too long
error: unable to create file spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/NativeImagePluginActionIntegrationTests-reachabilityMetadataConfigurationFilesFromFileRepositoryAreCopiedToJar.gradle: Filename too long
error: unable to create file spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/buildinfo/BuildInfoIntegrationTests-notUpToDateWhenExecutedTwiceWithFixedTimeAndChangedGradlePropertiesProjectVersion.gradle: Filename too long
error: unable to create file spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-whenAResolvableCopyOfAnUnresolvableConfigurationIsResolvedThenResolutionSucceeds.gradle: Filename too long
Updating files: 100% (8750/8750), done.
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
PS F:\JavaProject> cd .\spring-boot\
PS F:\JavaProject\spring-boot> .\gradlew build -x test
> Task :spring-boot-project:spring-boot-actuator-autoconfigure:asciidoctor FAILED
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':spring-boot-project:spring-boot-actuator-autoconfigure:asciidoctor' (type 'AsciidoctorTask').
- In plugin 'org.asciidoctor.gradle.jvm.AsciidoctorJBasePlugin' type 'org.asciidoctor.gradle.jvm.AsciidoctorTask' property 'generatedSnippets' specifies directory 'F:\JavaProject\spring-boot\spring-boot-project\spring-boot-actuator-autoconfigure\build\generated-snippets' which doesn't exist.
Reason: An input file was expected to be present but it doesn't exist.
Possible solutions:
1. Make sure the directory exists before the task is called.
2. Make sure that the task which produces the directory is declared as an input.
Please refer to https://docs.gradle.org/7.6/userguide/validation_problems.html#input_file_does_not_exist for more details about this problem.
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 33m 39s
462 actionable tasks: 412 executed, 50 from cache
WARNING: 1 build scan custom value was not captured:
- Maximum custom value value length (100,000) exceeded: Git status
A build scan was not published as you have not authenticated with server 'ge.spring.io'.
For more information, please see https://gradle.com/help/gradle-authenticating-with-gradle-enterprise.
Comment From: wilkinsona
You've run the build without the tests. That will not work as the documentation for the Actuator is test-driven as it uses Spring REST Docs. You should use gradlew build as described on the wiki.
Comment From: xiaoyaobishizhe
I have used gradlew build command, but still failed.
PS F:\JavaProject> git config --global core.autocrlf true
PS F:\JavaProject> git clone https://github.com/spring-projects/spring-boot.git
Cloning into 'spring-boot'...
remote: Enumerating objects: 773967, done.
remote: Counting objects: 100% (252/252), done.
remote: Compressing objects: 100% (142/142), done.
remote: Total 773967 (delta 59), reused 191 (delta 38), pack-reused 773715
Receiving objects: 100% (773967/773967), 156.35 MiB | 2.66 MiB/s, done.
Resolving deltas: 100% (344136/344136), done.
error: unable to create file spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/NativeImagePluginActionIntegrationTests-classesGeneratedDuringAotTestProcessingAreOnTheTestNativeImageClasspath.gradle: Filename too long
error: unable to create file spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/NativeImagePluginActionIntegrationTests-reachabilityMetadataConfigurationFilesFromFileRepositoryAreCopiedToJar.gradle: Filename too long
error: unable to create file spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/buildinfo/BuildInfoIntegrationTests-notUpToDateWhenExecutedTwiceWithFixedTimeAndChangedGradlePropertiesProjectVersion.gradle: Filename too long
error: unable to create file spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-whenAResolvableCopyOfAnUnresolvableConfigurationIsResolvedThenResolutionSucceeds.gradle: Filename too long
Updating files: 100% (8750/8750), done.
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
PS F:\JavaProject> cd .\spring-boot\
PS F:\JavaProject\spring-boot> .\gradlew build
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
> Task :spring-boot-project:spring-boot-tools:spring-boot-antlib:integrationTest
Trying to override old definition of task fail
Trying to override old definition of datatype resources
Trying to override old definition of task buildnumber
> Task :spring-boot-system-tests:spring-boot-image-tests:jar
:spring-boot-system-tests:spring-boot-image-tests:jar: No valid plugin descriptors were found in META-INF/gradle-plugins
> Task :spring-boot-tests:spring-boot-smoke-tests:spring-boot-smoke-test-ant:antRun
Buildfile: F:\JavaProject\spring-boot\spring-boot-tests\spring-boot-smoke-tests\spring-boot-smoke-test-ant\build.xml
clean:
clean-ivy-cache:
[ivy:cleancache] :: Apache Ivy 2.5.0 - 20191020104435 :: https://ant.apache.org/ivy/ ::
[ivy:cleancache] :: loading settings :: file = F:\JavaProject\spring-boot\spring-boot-tests\spring-boot-smoke-tests\spring-boot-smoke-test-ant\ivysettings.xml
resolve:
[ivy:retrieve] :: resolving dependencies :: org.springframework.boot#spring-boot-smoke-test-ant;working@xiaoyaobishizhe-PC
[ivy:retrieve] confs: [compile, runtime, loader]
[ivy:retrieve] found org.springframework.boot#spring-boot-starter;3.0.2-SNAPSHOT in local
[ivy:retrieve] found org.springframework.boot#spring-boot;3.0.2-SNAPSHOT in local
[ivy:retrieve] found org.springframework#spring-core;6.0.3 in ibiblio
[ivy:retrieve] found org.springframework#spring-jcl;6.0.3 in ibiblio
[ivy:retrieve] found org.springframework#spring-context;6.0.3 in ibiblio
[ivy:retrieve] found org.springframework#spring-aop;6.0.3 in ibiblio
[ivy:retrieve] found org.springframework#spring-beans;6.0.3 in ibiblio
[ivy:retrieve] found org.springframework#spring-expression;6.0.3 in ibiblio
[ivy:retrieve] found org.springframework.boot#spring-boot-autoconfigure;3.0.2-SNAPSHOT in local
[ivy:retrieve] found org.springframework.boot#spring-boot-starter-logging;3.0.2-SNAPSHOT in local
[ivy:retrieve] found ch.qos.logback#logback-classic;1.4.5 in ibiblio
[ivy:retrieve] found ch.qos.logback#logback-core;1.4.5 in ibiblio
[ivy:retrieve] found org.slf4j#slf4j-api;2.0.4 in ibiblio
[ivy:retrieve] found org.apache.logging.log4j#log4j-to-slf4j;2.19.0 in ibiblio
[ivy:retrieve] found org.slf4j#jul-to-slf4j;2.0.6 in ibiblio
[ivy:retrieve] found org.slf4j#slf4j-api;2.0.6 in ibiblio
[ivy:retrieve] found jakarta.annotation#jakarta.annotation-api;2.1.1 in ibiblio
[ivy:retrieve] found org.yaml#snakeyaml;1.33 in ibiblio
[ivy:retrieve] found org.springframework.boot#spring-boot-loader;3.0.2-SNAPSHOT in local
[ivy:retrieve] downloading F:\JavaProject\spring-boot\spring-boot-tests\spring-boot-smoke-tests\spring-boot-smoke-test-ant\build\test-repository\org\springframework\boot\spring-boot\3.0.2-SNAPSHOT\spring-boot-3.0.2-SNAPSHOT.jar ...
[ivy:retrieve] ........................ (1446kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.springframework.boot#spring-boot;3.0.2-SNAPSHOT!spring-boot.jar (13ms)
[ivy:retrieve] downloading F:\JavaProject\spring-boot\spring-boot-tests\spring-boot-smoke-tests\spring-boot-smoke-test-ant\build\test-repository\org\springframework\boot\spring-boot-autoconfigure\3.0.2-SNAPSHOT\spring-boot-autoconfigure-3.0.2-SNAPSHOT.jar ...
[ivy:retrieve] .......................... (1586kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.springframework.boot#spring-boot-autoconfigure;3.0.2-SNAPSHOT!spring-boot-autoconfigure.jar (15ms)
[ivy:retrieve] downloading F:\JavaProject\spring-boot\spring-boot-tests\spring-boot-smoke-tests\spring-boot-smoke-test-ant\build\test-repository\org\springframework\boot\spring-boot-starter-logging\3.0.2-SNAPSHOT\spring-boot-starter-logging-3.0.2-SNAPSHOT.jar ...
[ivy:retrieve] .. (4kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.springframework.boot#spring-boot-starter-logging;3.0.2-SNAPSHOT!spring-boot-starter-logging.jar (5ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/jakarta/annotation/jakarta.annotation-api/2.1.1/jakarta.annotation-api-2.1.1.jar ...
[ivy:retrieve] ... (25kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] jakarta.annotation#jakarta.annotation-api;2.1.1!jakarta.annotation-api.jar (1399ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/springframework/spring-core/6.0.3/spring-core-6.0.3.jar ...
[ivy:retrieve] .......
[ivy:retrieve] ......
[ivy:retrieve] ......
[ivy:retrieve] .....
[ivy:retrieve] ......
[ivy:retrieve] .....
[ivy:retrieve] ....
[ivy:retrieve] ....
[ivy:retrieve] ..
[ivy:retrieve] .
[ivy:retrieve] .
[ivy:retrieve] ..
[ivy:retrieve] ...
[ivy:retrieve] ...
[ivy:retrieve] ....
[ivy:retrieve] ......
[ivy:retrieve] .......
[ivy:retrieve] .......
[ivy:retrieve] .......
[ivy:retrieve] .....
[ivy:retrieve] ....
[ivy:retrieve] .....
[ivy:retrieve] ....
[ivy:retrieve] .....
[ivy:retrieve] ... (1749kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.springframework#spring-core;6.0.3!spring-core.jar (111346ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/yaml/snakeyaml/1.33/snakeyaml-1.33.jar ...
[ivy:retrieve] .....
[ivy:retrieve] ....
[ivy:retrieve] ....
[ivy:retrieve] ....
[ivy:retrieve] ..... (323kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.yaml#snakeyaml;1.33!snakeyaml.jar(bundle) (9208ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/springframework/spring-context/6.0.3/spring-context-6.0.3.jar ...
<[ivy:retrieve] ...
[ivy:retrieve] ...
[ivy:retrieve] ....
[ivy:retrieve] .....
[ivy:retrieve] .....
[ivy:retrieve] .....
[ivy:retrieve] ......
[ivy:retrieve] ......
[ivy:retrieve] .......
[ivy:retrieve] .....
[ivy:retrieve] .....
[ivy:retrieve] ....
[ivy:retrieve] ....
[ivy:retrieve] ....
[ivy:retrieve] ....
[ivy:retrieve] .... (1144kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.springframework#spring-context;6.0.3!spring-context.jar (27948ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/springframework/spring-jcl/6.0.3/spring-jcl-6.0.3.jar ...
[ivy:retrieve] ..
[ivy:retrieve] . (22kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.springframework#spring-jcl;6.0.3!spring-jcl.jar (2719ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/springframework/spring-aop/6.0.3/spring-aop-6.0.3.jar ...
[ivy:retrieve] ....
[ivy:retrieve] ....
[ivy:retrieve] .....
[ivy:retrieve] ...
[ivy:retrieve] ...
[ivy:retrieve] ...
[ivy:retrieve] .... (386kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.springframework#spring-aop;6.0.3!spring-aop.jar (13343ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/springframework/spring-beans/6.0.3/spring-beans-6.0.3.jar ...
[ivy:retrieve] ....
[ivy:retrieve] ....
[ivy:retrieve] .....
[ivy:retrieve] ......
[ivy:retrieve] .......
[ivy:retrieve] .......
[ivy:retrieve] .......
[ivy:retrieve] .......
[ivy:retrieve] ...... (822kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.springframework#spring-beans;6.0.3!spring-beans.jar (15787ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/springframework/spring-expression/6.0.3/spring-expression-6.0.3.jar ...
[ivy:retrieve] .......
[ivy:retrieve] ...
[ivy:retrieve] ....
[ivy:retrieve] ...... (284kB)
<[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.springframework#spring-expression;6.0.3!spring-expression.jar (9228ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/ch/qos/logback/logback-classic/1.4.5/logback-classic-1.4.5.jar ...
[ivy:retrieve] ....
[ivy:retrieve] ...
[ivy:retrieve] ....
[ivy:retrieve] ....
[ivy:retrieve] ... (259kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] ch.qos.logback#logback-classic;1.4.5!logback-classic.jar (8871ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-to-slf4j/2.19.0/log4j-to-slf4j-2.19.0.jar ...
[ivy:retrieve] ... (18kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.apache.logging.log4j#log4j-to-slf4j;2.19.0!log4j-to-slf4j.jar (1265ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/slf4j/jul-to-slf4j/2.0.6/jul-to-slf4j-2.0.6.jar ...
[ivy:retrieve] .. (4kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.slf4j#jul-to-slf4j;2.0.6!jul-to-slf4j.jar (990ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/ch/qos/logback/logback-core/1.4.5/logback-core-1.4.5.jar ...
[ivy:retrieve] ........
[ivy:retrieve] ........
[ivy:retrieve] ......
[ivy:retrieve] .....
<[ivy:retrieve] .....
[ivy:retrieve] ..... (563kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] ch.qos.logback#logback-core;1.4.5!logback-core.jar (11017ms)
[ivy:retrieve] downloading https://repo1.maven.org/maven2/org/slf4j/slf4j-api/2.0.6/slf4j-api-2.0.6.jar ...
[ivy:retrieve] ..... (61kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.slf4j#slf4j-api;2.0.6!slf4j-api.jar (2387ms)
[ivy:retrieve] downloading F:\JavaProject\spring-boot\spring-boot-tests\spring-boot-smoke-tests\spring-boot-smoke-test-ant\build\test-repository\org\springframework\boot\spring-boot-loader\3.0.2-SNAPSHOT\spring-boot-loader-3.0.2-SNAPSHOT.jar ...
[ivy:retrieve] ... (122kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] org.springframework.boot#spring-boot-loader;3.0.2-SNAPSHOT!spring-boot-loader.jar (6ms)
[ivy:retrieve] :: resolution report :: resolve 53155ms :: artifacts dl 215562ms
[ivy:retrieve] :: evicted modules:
[ivy:retrieve] org.slf4j#slf4j-api;2.0.4 by [org.slf4j#slf4j-api;2.0.6] in [compile, runtime]
[ivy:retrieve] org.slf4j#slf4j-api;1.7.36 by [org.slf4j#slf4j-api;2.0.4] in [compile, runtime]
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| compile | 19 | 18 | 18 | 2 || 16 | 16 |
| runtime | 19 | 18 | 18 | 2 || 16 | 16 |
| loader | 1 | 1 | 1 | 0 || 1 | 1 |
---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: org.springframework.boot#spring-boot-smoke-test-ant
[ivy:retrieve] confs: [compile, runtime, loader]
[ivy:retrieve] 33 artifacts copied, 0 already retrieved (17533kB/52ms)
classpaths:
init:
[mkdir] Created dir: F:\JavaProject\spring-boot\spring-boot-tests\spring-boot-smoke-tests\spring-boot-smoke-test-ant\build\ant\classes
compile:
[javac] Compiling 1 source file to F:\JavaProject\spring-boot\spring-boot-tests\spring-boot-smoke-tests\spring-boot-smoke-test-ant\build\ant\classes
[javac] ????: [options] δ?? -source 8 ?????????????·??
[javac] 1 ??????
build:
[echo] Using start class smoketest.ant.SampleAntApplication
[echo] Using destination directory F:\JavaProject\spring-boot\spring-boot-tests\spring-boot-smoke-tests\spring-boot-smoke-test-ant\build\ant\libs
[mkdir] Created dir: F:\JavaProject\spring-boot\spring-boot-tests\spring-boot-smoke-tests\spring-boot-smoke-test-ant\build\ant\libs\dependency
[echo] Extracting spring-boot-loader to F:\JavaProject\spring-boot\spring-boot-tests\spring-boot-smoke-tests\spring-boot-smoke-test-ant\build\ant\libs/dependency
[copy] Copying 1 resource to F:\JavaProject\spring-boot\spring-boot-tests\spring-boot-smoke-tests\spring-boot-smoke-test-ant\build\ant\libs\dependency
[echo] Embedding spring-boot-loader v3.0.2-SNAPSHOT...
[jar] Building jar: F:\JavaProject\spring-boot\spring-boot-tests\spring-boot-smoke-tests\spring-boot-smoke-test-ant\build\ant\libs\spring-boot-smoke-test-ant.jar
BUILD SUCCESSFUL
Total time: 4 minutes 31 seconds
> Task :spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin:test
NativeImagePluginActionIntegrationTests > classesGeneratedDuringAotTestProcessingAreOnTheTestNativeImageClasspath() > org.springframework.boot.gradle.plugin.NativeImagePluginActionIntegrationTests.classesGeneratedDuringAotTestProcessingAreOnTheTestNativeImageClasspath()[1] FAILED
java.lang.RuntimeException at NativeImagePluginActionIntegrationTests.java:113
Caused by: java.lang.NullPointerException at NativeImagePluginActionIntegrationTests.java:113
NativeImagePluginActionIntegrationTests > classesGeneratedDuringAotTestProcessingAreOnTheTestNativeImageClasspath() > org.springframework.boot.gradle.plugin.NativeImagePluginActionIntegrationTests.classesGeneratedDuringAotTestProcessingAreOnTheTestNativeImageClasspath()[2] FAILED
java.lang.RuntimeException at NativeImagePluginActionIntegrationTests.java:113
Caused by: java.lang.NullPointerException at NativeImagePluginActionIntegrationTests.java:113
NativeImagePluginActionIntegrationTests > reachabilityMetadataConfigurationFilesFromFileRepositoryAreCopiedToJar() > org.springframework.boot.gradle.plugin.NativeImagePluginActionIntegrationTests.reachabilityMetadataConfigurationFilesFromFileRepositoryAreCopiedToJar()[1] FAILED
java.lang.RuntimeException at NativeImagePluginActionIntegrationTests.java:77
Caused by: java.lang.NullPointerException at NativeImagePluginActionIntegrationTests.java:77
NativeImagePluginActionIntegrationTests > reachabilityMetadataConfigurationFilesFromFileRepositoryAreCopiedToJar() > org.springframework.boot.gradle.plugin.NativeImagePluginActionIntegrationTests.reachabilityMetadataConfigurationFilesFromFileRepositoryAreCopiedToJar()[2] FAILED
java.lang.RuntimeException at NativeImagePluginActionIntegrationTests.java:77
Caused by: java.lang.NullPointerException at NativeImagePluginActionIntegrationTests.java:77
<
BuildInfoIntegrationTests > notUpToDateWhenExecutedTwiceWithFixedTimeAndChangedGradlePropertiesProjectVersion() > org.springframework.boot.gradle.tasks.buildinfo.BuildInfoIntegrationTests.notUpToDateWhenExecutedTwiceWithFixedTimeAndChangedGradlePropertiesProjectVersion()[1] FAILED
java.lang.RuntimeException at BuildInfoIntegrationTests.java:105
Caused by: java.lang.NullPointerException at BuildInfoIntegrationTests.java:105
BuildInfoIntegrationTests > notUpToDateWhenExecutedTwiceWithFixedTimeAndChangedGradlePropertiesProjectVersion() > org.springframework.boot.gradle.tasks.buildinfo.BuildInfoIntegrationTests.notUpToDateWhenExecutedTwiceWithFixedTimeAndChangedGradlePropertiesProjectVersion()[2] FAILED
java.lang.RuntimeException at BuildInfoIntegrationTests.java:105
Caused by: java.lang.NullPointerException at BuildInfoIntegrationTests.java:105
BuildInfoIntegrationTests > notUpToDateWhenExecutedTwiceWithFixedTimeAndChangedGradlePropertiesProjectVersion() > org.springframework.boot.gradle.tasks.buildinfo.BuildInfoIntegrationTests.notUpToDateWhenExecutedTwiceWithFixedTimeAndChangedGradlePropertiesProjectVersion()[3] FAILED
java.lang.RuntimeException at BuildInfoIntegrationTests.java:105
Caused by: java.lang.NullPointerException at BuildInfoIntegrationTests.java:105
BuildInfoIntegrationTests > notUpToDateWhenExecutedTwiceWithFixedTimeAndChangedGradlePropertiesProjectVersion() > org.springframework.boot.gradle.tasks.buildinfo.BuildInfoIntegrationTests.notUpToDateWhenExecutedTwiceWithFixedTimeAndChangedGradlePropertiesProjectVersion()[4] FAILED
java.lang.RuntimeException at BuildInfoIntegrationTests.java:105
Caused by: java.lang.NullPointerException at BuildInfoIntegrationTests.java:105
<<============-> 99% EXECUTING [29m 49s]
BootJarIntegrationTests > whenAResolvableCopyOfAnUnresolvableConfigurationIsResolvedThenResolutionSucceeds() > org.springframework.boot.gradle.tasks.bundling.BootJarIntegrationTests.whenAResolvableCopyOfAnUnresolvableConfigurationIsResolvedThenResolutionSucceeds()[1] FAILED
java.lang.RuntimeException at BootJarIntegrationTests.java:48
Caused by: org.gradle.testkit.runner.UnexpectedBuildFailure at BootJarIntegrationTests.java:48mework...bundling.BootJarIntegrationTests
BootJarIntegrationTests > whenAResolvableCopyOfAnUnresolvableConfigurationIsResolvedThenResolutionSucceeds() > org.springframework.boot.gradle.tasks.bundling.BootJarIntegrationTests.whenAResolvableCopyOfAnUnresolvableConfigurationIsResolvedThenResolutionSucceeds()[2] FAILED
java.lang.RuntimeException at BootJarIntegrationTests.java:48
Caused by: org.gradle.testkit.runner.UnexpectedBuildFailure at BootJarIntegrationTests.java:48
BootJarIntegrationTests > whenAResolvableCopyOfAnUnresolvableConfigurationIsResolvedThenResolutionSucceeds() > org.springframework.boot.gradle.tasks.bundling.BootJarIntegrationTests.whenAResolvableCopyOfAnUnresolvableConfigurationIsResolvedThenResolutionSucceeds()[3] FAILED
java.lang.RuntimeException at BootJarIntegrationTests.java:48
Caused by: org.gradle.testkit.runner.UnexpectedBuildFailure at BootJarIntegrationTests.java:48
BootJarIntegrationTests > whenAResolvableCopyOfAnUnresolvableConfigurationIsResolvedThenResolutionSucceeds() > org.springframework.boot.gradle.tasks.bundling.BootJarIntegrationTests.whenAResolvableCopyOfAnUnresolvableConfigurationIsResolvedThenResolutionSucceeds()[4] FAILED
java.lang.RuntimeException at BootJarIntegrationTests.java:48
Caused by: org.gradle.testkit.runner.UnexpectedBuildFailure at BootJarIntegrationTests.java:48
683 tests completed, 12 failed
> Task :spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin:test FAILED
Found test failures in 1 test task:
:spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin:test
org.springframework.boot.gradle.plugin.NativeImagePluginActionIntegrationTests > classesGeneratedDuringAotTestProcessingAreOnTheTestNativeImageClasspath()[1]
org.springframework.boot.gradle.plugin.NativeImagePluginActionIntegrationTests > classesGeneratedDuringAotTestProcessingAreOnTheTestNativeImageClasspath()[2]
org.springframework.boot.gradle.plugin.NativeImagePluginActionIntegrationTests > reachabilityMetadataConfigurationFilesFromFileRepositoryAreCopiedToJar()[1]
org.springframework.boot.gradle.plugin.NativeImagePluginActionIntegrationTests > reachabilityMetadataConfigurationFilesFromFileRepositoryAreCopiedToJar()[2]
org.springframework.boot.gradle.tasks.buildinfo.BuildInfoIntegrationTests > notUpToDateWhenExecutedTwiceWithFixedTimeAndChangedGradlePropertiesProjectVersion()[1]
org.springframework.boot.gradle.tasks.buildinfo.BuildInfoIntegrationTests > notUpToDateWhenExecutedTwiceWithFixedTimeAndChangedGradlePropertiesProjectVersion()[2]
org.springframework.boot.gradle.tasks.buildinfo.BuildInfoIntegrationTests > notUpToDateWhenExecutedTwiceWithFixedTimeAndChangedGradlePropertiesProjectVersion()[3]
org.springframework.boot.gradle.tasks.buildinfo.BuildInfoIntegrationTests > notUpToDateWhenExecutedTwiceWithFixedTimeAndChangedGradlePropertiesProjectVersion()[4]
org.springframework.boot.gradle.tasks.bundling.BootJarIntegrationTests > whenAResolvableCopyOfAnUnresolvableConfigurationIsResolvedThenResolutionSucceeds()[1]
org.springframework.boot.gradle.tasks.bundling.BootJarIntegrationTests > whenAResolvableCopyOfAnUnresolvableConfigurationIsResolvedThenResolutionSucceeds()[2]
org.springframework.boot.gradle.tasks.bundling.BootJarIntegrationTests > whenAResolvableCopyOfAnUnresolvableConfigurationIsResolvedThenResolutionSucceeds()[3]
org.springframework.boot.gradle.tasks.bundling.BootJarIntegrationTests > whenAResolvableCopyOfAnUnresolvableConfigurationIsResolvedThenResolutionSucceeds()[4]
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin:test'.
> There were failing tests. See the report at: file:///F:/JavaProject/spring-boot/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/build/reports/tests/test/index.html
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 37m 20s
2701 actionable tasks: 1912 executed, 789 from cache
WARNING: 1 build scan custom value was not captured:
- Maximum custom value value length (100,000) exceeded: Git status
A build scan was not published as you have not authenticated with server 'ge.spring.io'.
For more information, please see https://gradle.com/help/gradle-authenticating-with-gradle-enterprise.
Comment From: ttddyy
I see you have some error messages for cloning.
error: unable to create file ... Filename too long
The error message is documented on the wiki that @wilkinsona pointed. https://github.com/spring-projects/spring-boot/wiki/Working-with-the-Code#cloning-the-git-repository-on-windows
Comment From: xiaoyaobishizhe
I see you have some error messages for cloning.
error: unable to create file ... Filename too longThe error message is documented on the wiki that @wilkinsona pointed. https://github.com/spring-projects/spring-boot/wiki/Working-with-the-Code#cloning-the-git-repository-on-windows
new error.
PS F:\JavaProject> git config --global core.autocrlf true
PS F:\JavaProject> git clone -c core.longPaths=true https://github.com/spring-projects/spring-boot
Cloning into 'spring-boot'...
remote: Enumerating objects: 774060, done.
remote: Counting objects: 100% (345/345), done.
remote: Compressing objects: 100% (212/212), done.
remote: Total 774060 (delta 80), reused 241 (delta 39), pack-reused 773715
Receiving objects: 100% (774060/774060), 156.51 MiB | 1.84 MiB/s, done.
Resolving deltas: 100% (344068/344068), done.
Updating files: 100% (8750/8750), done.
PS F:\JavaProject> cd .\spring-boot\
PS F:\JavaProject\spring-boot> git reset --hard v3.0.1
HEAD is now at 837947ca09 Release v3.0.1
PS F:\JavaProject\spring-boot> .\gradlew build
> Task :spring-boot-project:spring-boot-tools:spring-boot-antlib:integrationTest
Trying to override old definition of task fail
Trying to override old definition of datatype resources
Trying to override old definition of task buildnumber
> Task :spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform:test FAILED
TarGzipBuildpackTests > resolveWhenFileUrlReturnsBuildpack() FAILED
java.lang.AssertionError at TarGzipBuildpackTests.java:66
497 tests completed, 1 failed, 12 skipped
> Task :spring-boot-project:spring-boot-test:test
Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
Found test failures in 1 test task:
:spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform:test
org.springframework.boot.buildpack.platform.build.TarGzipBuildpackTests > resolveWhenFileUrlReturnsBuildpack()
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform:test'.
> There were failing tests. See the report at: file:///F:/JavaProject/spring-boot/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/build/reports/tests/test/index.html
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 12m 18s
844 actionable tasks: 663 executed, 181 from cache
A build scan was not published as you have not authenticated with server 'ge.spring.io'.
For more information, please see https://gradle.com/help/gradle-authenticating-with-gradle-enterprise.
Comment From: wilkinsona
I don't think I've ever seen that test fail before so I suspect it's something specific to your environment. Without further information, we're not going to be able to help you.