Details
Description
when using web apps using war overlays (e.g. one of the samples in Scalate which reuses the scalate console using an overlay), changing templates don't seem to get recognised in jetty:run. To re-evaluate a template you have to stop & restart "mvn jetty:run"!
However if we zap the redundant copy of the source templates from src/main/webapp which get copied into target/tmp/webinf/WEB-INF/ then it all works fine.
The question is, since the source of target/tmp/webinf/WEB-INF is all available in src/main/webapp/WEB-INF - why does the maven plugin make a redundant copy when using overlays - that then breaks reloading.
Maybe it needs to only copy stuff to target/tmp/webinf/WEB-INF if there is not a file of the same name in src/main/webapp/WEB-INF? i.e. delete the stuff from the overlay which exists in src/main/webapp/WEB-INF?
Issue Links
- duplicates
-
JETTY-1027
mvn jetty:run does not seem to support WAR overlays...
-
if you're interested in a little sample project to play with to demonstrate this, grab scalate...
http://scalate.fusesource.org/source.html
git clone git://github.com/scalate/scalate.git cd scalateits probably safest to do a build first
http://scalate.fusesource.org/building.html
then do
now view
http://localhost:8080/foo.ssp
now try editing
scalate-sample/src/main/webapp/WEB-INF/foo.ssp
reload the browser - see how its not detected the changed template file?
If you do
now do a reload in your browser. Hey presto - the template is now reloaded.
Bsaically Jetty is serving up the copy it made of the source on startup in target/tmp/webinf/WEB-INF/ rather than looking in src/main/webapp/WEB-INF