I cloned spring integration samples from below url.
https://github.com/spring-projects/spring-integration-samples
And I tried build with gradlew. but build failed.
D:\workspace_spring\spring-integration-samples>gradlew build
> Task :barrier:bootJar FAILED
FAILURE: Build failed with an exception.
* What went wrong: Execution failed for task ':barrier:bootJar'. > Unable to find a single main class from the following candidates [org.springframework.integration.samples.barrier2.ErrorHandlingApplication, org.springframework.integration.samples.barrier.Application]
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 7s 19 actionable tasks: 1 executed, 18 up-to-date
D:\workspace_spring\spring-integration-samples>gradlew -v
------------------------------------------------------------ Gradle 6.3 ------------------------------------------------------------
Build time: 2020-03-24 19:52:07 UTC Revision: bacd40b727b0130eeac8855ae3f9fd9a0b207c60
Kotlin: 1.3.70 Groovy: 2.5.10 Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019 JVM: 1.8.0_202 (Oracle Corporation 25.202-b08) OS: Windows 10 10.0 amd64
Why this build error is occured? Is it related to gradle's version?
Any little clue even would be helpful. Thanks in advance.
It turns out that we had upgraded Spring Boot but didn't change the respective config for Gradle.
More over we have never call build
: only clean check
is enough for us. But I see your point and I am fixing it right now to the proper actual Spring Boot Gradle plugin config.
See the fix here: https://github.com/spring-projects/spring-integration-samples/commit/c72d642f35414089cfe33a2b32414ec0a869f8a6