Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Gradle plugin fails with multiple JavaExec tasks in the build #721
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:
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?
added a commit
Apr 23, 2014
referenced this issue
Apr 26, 2014
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 :-)