问题
I want to launch scalatra server from sbt. How do I do that? The following does launch scalatra:
sbt "container:start"
But it exits immediately:
[info] starting server ...
[success] Total time: 2 s, completed Sep 12, 2015 2:39:32 PM
> [info] waiting for server to shut down...
Most preferably the whole thing would run in a nohup as a daemon process.
回答1:
Don't do it on one line. Use two commands.
./sbt
container:start
回答2:
sbt "; <command>; console"
does the trick. Note the initial semicolon is required.
来源:https://stackoverflow.com/questions/32544032/how-to-keep-sbt-running-as-a-daemon-process-after-executing-a-command