playframework - Play Framework not picking up changes to public files -


i using scala play framework [2.4.2] build backend of single page app angular. have front end stuff in own folder , compiling , minimising assets gulp.js.

after every change front end recompiling into

 /ui/dist/assets 

and have added build.sbt

unmanagedresourcedirectories in assets += basedirectory.value / "ui/dist/assets" 

then in routes doing this:

get         /assets/*file                        controllers.assets.at(path="/public", file) 

this works fine except when make change files , rebuilt play not find new files. exist in ui assets directory 404 error within browser. restarting play fix , if play incrementally compiles (which not done when gulp runs) things work.

the documentation mentions assets packaged application jar file , makes sense error until rebuilt. there way force this? auto incrementer isnt picking changes.

ugh, had lot of trouble trying find solution can add folder classpath of play. wasn't ideal anyway because developers explicitly don't want assets in classpath

came hack. touching file in classpath forcing reload.

in gulpfile after building:

gulp.task('reload', [], function() {   fs.closesync(fs.opensync('../conf/test', 'w')); }); 

Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -