-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
Gradle plugin fails with multiple JavaExec tasks in the build #721
Comments
Versions 0.33.0+ don't work properly with spring-boot-gradle-plugin spring-projects/spring-boot#721
All that sounds very sensible, as long as it basically preserves the existing behaviour for "simple" projects with no explicit run exec tasks. Would you like to submit a pull request (see link in README for contributor's agreement)? |
I will try to make required modifications, but probably not until May. When do you plan to release 1.0.3? |
I think 794808b should have fixed this, please give the latest 1.1.0 SNAPSHOT a go. |
Thanks Phil. The problem is not reproducible with the sample application and 1.1.0.M2. @holgerstolzenberg, could you check it with your production system? |
I just upgraded to 1.1.0.RC1. It seems the issue is fixed. I can run pitest and bootRun tasks successfully. With the bootRun there was another issue with the ASM but it seems related to spring-loaded. Removed spring-loaded from buildscript dependencies and everything works fine. So I think this can be closed. @szpak You may want to release 0.33.0-SNAPSHOT now :-) |
Working on an issue in gradle-pitest-plugin I spotted that spring-boot-gradle-plugin doesn't work well with multiple JavaExec tasks available in the build.
There are a few issues:
There is a small application created by @lando which reproduces mentioned problems.
I don't know what was the reason (the use cases) to support multiple JavaExec tasks and I'm not sure what would be best to resolve this situation. I have experience only with one Spring Boot project, but maybe in most cases there is an assumption that spring-boot plugin will create and configure ApplicationPlugin plugin (which would work by default). In case of other JavaExec tasks there could be checked the task name. One existing JavaExec task with the name "run" (from ApplicationPlugin) should be accepted. In other cases there should be reported an error listing existing JavaExec tasks (with their names) and the information that task(s) to be enhanced (and run on bootRun) should be explicit configured (by name?) in spring-boot configuration closure. This would (probably) fix issues 1,2,4. Issue 3 could be probably fixed by the move the tasks enhancements to project.afterEvaluate phase when all tasks are known and selected can be enhanced (needs to be verified in practice).
What do you think about that?
The text was updated successfully, but these errors were encountered: