Continuous Build not working with Vert.x

Hi all,

I’ve recently been working on a project using the vert.x web framework. I’m using the java and application plugins, and the ‘run’ task to well… run the application.

I’ve been hoping to use the continuous build feature of gradle as it will simplify development significantly, but it doesn’t seem to be working. The issue is that the ‘build’ never gets past “> Building 83% > :run”, so it doesn’t get to the point where it starts watching files.

My thought is that this could be something to do with what vert.x does under the hood vs. a more traditional program, but if anyone else has run into this issue and found a solution it would be greatly appreciated.

Thanks! =)


Assuming you’re using the run task of the application plugin which is of type JavaExec. Currently it is not possible in Gradle to initiate a rebuild with a running JavaExec task. This kind of functionality is implemented for the PlayRun task that reloads play applications if something changed. I think it would be a good idea to have a similar RunApplication task that has this kind of functionality. I think at the moment the Gradle team does not have the bandwith to work on this as there are other priorities. But maybe you’re interested in helping out the Gradle team with this?


Hi René,

I could be interested in doing this; since asking I’ve looked at the source a bit (enough to find the execHandle.start().waitForFinish() call that blocks).

I could definitely do the work to add some logic that only waits for it to finish if continuous run isn’t required.

I guess the one question I would have before doing it though is about how the continuous deployment works (I suppose in the Play framework case); I’ve taken a look at PlayRun and it seems as though it creates a handle using a DeploymentRegistry. If I do something similar, do you happen to know if this is enough to hook into the stop/build/start logic?



Ah, read through your comment again.
From your perspective would it make more sense to have a separate task type, or simply add the continuous run functionality to JavaExec?
To me it would make some sense to add the functionality to JavaExec task so that things like the Application plugin could immediately use the new functionality (maybe protected by a flag like allowContinuous if JavaExec is used places where not waiting for the task to finish would break it). However, you know more about this than me so I’d of course defer to your expertise. I guess if the main purpose of ‘JavaExec’ is to run programs then it would make sense to add the functionality; if it’s just something that it gets used for but isn’t really the main goal then it would make sense to have a new task type…