I'm using sbt 0.11.2 with xsbt-web-plugin 0.2.10 to build a Wicket (1.5.3) app. I'm using this version of Jetty:
"org.eclipse.jetty" % "jetty-webapp" % "8.0.1.v20110908" % "container",
So when I do
> container:start
my app starts up just fine.
But if I change some some of the html, the change does not kick in until I do
> copy-resources
and scala source code changes are not reflected until I do
> aux-compile(this one was hard to find out!!)
The problem is that I want this to be reflected immediately. I can do
> ~ copy-resources
or
> ~ aux-compile
separately so that one or the other will happen on save automatically.
The problem is that I don't see any obvious way to do both because I can't enter a 2nd tilde-prefixed command without pressing the enter key first to get the command prompt, and that cancels the running tilde command.
Thanks.
UPDATE:
I posted a minimal example of what I'm trying to do here:
https://github.com/jpswain/DummySbtScalaWicket.git
I fire this up by running sbt (0.11.2), and then doing
> container:start
So you will notice that if you do "~aux-compile" and change a log statement, or change the name that is read by the label, that will be updated on the fly. If you do "~copy-resources" and change "Hello" -> "Hola" you will see that changed on the fly. I'm trying to make it so that both will be done on save. "~container:reload /" seems to do nothing!
The answer from @Vasil Remeniuk seems like the right approach, except I haven't figure out exactly where to put the code to make it work. (I get a syntax error.) It would be great if someone would please verify if that code will work, or if I'm doing something wrong with my project that would prevent it from working?
Thanks!!
Jamie
$ sbt
once sbt comes up, do this:
> container:start
> ~auxx
~
accepts any command as an argument, including a command list:
~ ;copy-resources;aux-compile
This will run copy-resources
and then aux-compile
on each trigger.
I prefer Vasil's solution in this case, however, because it only requires one evaluation of the task graph.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With