Reputation: 1442
The Problem/s:
~run
but only a manual server restart will update the content on the server.routes
under conf
are only shown after manually restarting the server.Background:
play ~run
To be able to make changes without having to restart the server each time I tried (without success):
clean
-> eclipse
-> ~run
clean
-> compile
-> ~run
Refresh using native hooks or polling
-> remove classes_managed
from Referenced Libraries
and add it manuallyQuestions:
Further information:
Both of them point to JNotify as the cause for auto-reloading not to work. One of the answers (not enough rep to write a comment) mentions how one could "hack Play framework's sbt plugin to make the PlayReloader trait behave as if JNotify wasn't available." How could one achieve this?
Upvotes: 5
Views: 3572
Reputation: 1478
I got around this problem by changing the project configuration in Eclipse. I unchecked the "Allow output folders for source folders" option, which means that Eclipse will compile classes to the "bin" folder. This prevents the Eclipse compilation from interfering with the Play compilation. The only downside is that you have to remember to redo it if you ever do play eclipse
again.
Upvotes: 1
Reputation: 101
The following got Play's auto-reload to working with Eclipse:
General
→ Workspace
. Uncheck Build automatically
.For whatever reason, I had to restart OS X to get akim's suggestion to take hold.
Upvotes: 2
Reputation: 1442
Following akim's suggestion, disabling Build automatically
under General\Workspace
in the Eclipse Preferences solves the problem and re-enables Play!'s auto-reload functionality in all of the above problem cases.
Upvotes: 0