🐞 Bug Report
Description of the Issue: I am encountering issues when building a Spring Boot project using Gradle. The project was created using Spring Initializr, and I am using JDK 17. The Gradle version was updated to 8.9, and the problem also occurred with version 8.7.
Versions Used:
Spring Boot: 3.3.2
Gradle: 8.9 (and also 8.7)
JDK: 17 (and also 22)
Issue: When attempting to build the project, I receive errors related to deprecated features. The build fails with the following error message:
`Execution failed for task ':ShoppingApplication.main()'.
Process 'command 'C:\Program Files\Microsoft\jdk-17.0.11.9-hotspot\bin\java.exe'' finished with non-zero exit value 1
- 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 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.8/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD FAILED in 31s 3 actionable tasks: 3 executed `
Steps to Reproduce:
Create a new Spring Boot project using Spring Initializr.
Download it
Open the project with Intellij IDEA
Open the main file and build
Run it
Additional Notes:
The issue persists even when using JDK 22.
The project is generated with the default Spring Initializr settings.
There are
Dependencies: dependencies { implementation("org.springframework.boot:spring-boot-starter-data-jdbc") implementation("org.springframework.boot:spring-boot-starter-data-jpa") implementation("org.springframework.boot:spring-boot-starter-data-redis") implementation("org.springframework.boot:spring-boot-starter-data-rest") implementation("org.springframework.boot:spring-boot-starter-jdbc") implementation("org.springframework.boot:spring-boot-starter-mail") implementation("org.springframework.boot:spring-boot-starter-oauth2-authorization-server") implementation("org.springframework.boot:spring-boot-starter-oauth2-client") implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server") implementation("org.springframework.boot:spring-boot-starter-security") implementation("org.springframework.boot:spring-boot-starter-thymeleaf") implementation("org.springframework.boot:spring-boot-starter-web") implementation("org.springframework.boot:spring-boot-starter-web-services") implementation("org.thymeleaf.extras:thymeleaf-extras-springsecurity6") runtimeOnly("com.microsoft.sqlserver:mssql-jdbc") runtimeOnly("com.mysql:mysql-connector-j") runtimeOnly("com.oracle.database.jdbc:ojdbc11") runtimeOnly("org.postgresql:postgresql") testImplementation("org.springframework.boot:spring-boot-starter-test") testImplementation("org.springframework.security:spring-security-test") testRuntimeOnly("org.junit.platform:junit-platform-launcher") }
Steps Taken to Resolve:
Checked compatibility of Spring Boot and Gradle versions.
Updated project settings to remove deprecated features.
Cleared Gradle cache and attempted to rebuild.
Thank you in advance for your assistance.
Comment From: snicoll
Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.