In playframework there is auto-reload feature. It means that in development mode on each request play checks files on changes, and recompiles and reloads project if necessary. So, for example if I $ touch conf/routes
, project will be reloaded on next request.
I'd like to add some custom file to watch for.
I believe watchSources
setting contains list of files play is watching for. But it doesn't work for me. Consider, we want to add trigger
file to watched sources.
watchSources <+= baseDirectory map { _ / "trigger" }
It is successfully added to watch sources
[sbt console] $ show watch-sources
[info] List(/* trigger appears in list */)
But play ignores trigger
changes and doesn't restart application. What I am missing? How to make play watch for custom file changes?