Automatic reboot using the Play platform on a network file system

I am running the Framework application for the platform in a virtual virtual machine with the project source code in a directory shared by the host system. The functionality of automatic reloading of the framework does not work.

This is (possibly) caused by the fact that JNotify cannot detect changes to the source files because the file system is not local. Both NFS and vboxsf suffer from the same problem.

Is there any way around this?

The Play Framework has a built-in backup mechanism for detecting changes in systems where JNotify is not available. Is it possible to somehow forcefully select a return mechanism? (An effective action would be acceptable.)

Any other solutions?

+3
source share
3 answers

In this situation, I came across. Switching to ~run(instead run) in the Play / SBT console bypasses JNotify (according to Josh Suret) and seems to solve the problem for me.

+3
source

Answering my own question: there is no easy way for this, and in the near future this function will not look like on a network file system.

It’s trivial to hack the sbt plugin for the Play platform and make PlayReloader behave as if JNotify was not available, but it was a dirty hack, to say the least.

Play , .

+1

According to James Roper, you can add the following to your build.sbt if you are using play 2.3.2 or later:

PlayKeys.playWatchService := play.sbtplugin.run.PlayWatchService.sbt(pollInterval.value)

Here is a link for James Roper full answer to this problem.

+1
source

All Articles