Sbt: Rolling with continuous/incremental compilation and Jetty
Join the DZone community and get the full member experience.Join For Free
As I mentioned in an earlier post we’re using SBT on our project and one of it’s cool features is that it will listen to the source directory and then automatically recompile the code when it detects file changes.
That plugin adds an action called ‘jetty’ to sbt so we (foolishly in hindsight) thought that we would be able to launch the application in triggered execution mode by making use of a ~ in front of that:
$ ./sbt > ~jetty
Unfortunately that doesn’t do any continuous compilation which left us quite confused until we realised that RTFM might be a good idea…
What we actually needed to launch the application locally and edit code/see changes as if it’s written in a dynamic language was the following:
$ ./sbt > jetty-run > ~ prepare-webapp
Opinions expressed by DZone contributors are their own.