Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootRun task fails to correctly signal startup errors / non-zero exit values to Gradle when devtools are active #44848

Closed
christianhujer opened this issue Mar 22, 2025 · 2 comments
Labels
status: duplicate A duplicate of another issue type: bug A general bug

Comments

@christianhujer
Copy link

Context: Spring Boot Gradle plugin.
Spring Boot version 3.4.4
Gradle version: 8.13

Use Case: Launching a Spring Boot application via the bootRun Gradle task.
Scenario: The Spring Boot application fails to launch, for example, because its port is already in use.

Expected behavior: The bootRun task fails the Gradle build.
Actual behavior: The Gradle build reports success.

The very same Spring Boot application, when launched from the command line, correctly signals a failed start by setting the process exit value to 1. This makes me believe that the issue is with the Gradle Plugin.

I will provide a sample project shortly and update this ticket once it is available.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 22, 2025
@bclozel bclozel added the status: waiting-for-feedback We need additional information before we can continue label Mar 22, 2025
@christianhujer
Copy link
Author

christianhujer commented Mar 23, 2025

Here's the showcase: https://github.com/christianhujer/springboot-44848

While creating the showcase, I figured that the unexpected behavior only occurs when org.springframework.boot:spring-boot-devtools is in the dependencies. I've updated the issue title accordingly.

From here, I see multiple options:

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Mar 23, 2025
@christianhujer christianhujer changed the title bootRun task fails to correctly signal startup errors / non-zero exit values to Gradle bootRun task fails to correctly signal startup errors / non-zero exit values to Gradle when devtools are active Mar 23, 2025
@wilkinsona
Copy link
Member

Thanks, @christianhujer. With this only happening when devtools is involved, I am pretty sure it’s a duplicate of #28541.

@wilkinsona wilkinsona added status: duplicate A duplicate of another issue type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged status: feedback-provided Feedback has been provided labels Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue type: bug A general bug
Projects
None yet
Development

No branches or pull requests

4 participants