I’m developing a Scalatra web app with Scalate Jade and using sbt 0.11.0
I’ve been packaging the web app with “com.github.siasia” %% “xsbt-web-plugin” % “0.1.2”.
I’ve also been experimenting with “com.zentrope” %% “xsbt-scalate-precompile-plugin” % “1.6” to compile the Jade files.
Unfortunately if I use the xsbt-web-plugin to package my war it clears the target directory from any precompiled Scalate files.
What is the best way to package a war with precompiled Scalate files?
Thanks to Keith Irwin, the author of xsbt-scalate-precompile-plugin, I now have a solution to my problem.
My Jade/Scalate files are in webapp/WEB-INF/template and webapp/WEB-INF/scalate/layouts directories.
I’m using the xsbt-web-plugin and xsbt-scalate-precompile-plugin sbt plugins.
In my plugins.sbt file.
In my build.scala file.
The 1.7 version of Keiths’ plugin allows for the setting of specific template directories which is what I really needed. The only caveat is that I must do a clean right before I call package-war or my compiled Jade files get removed.