如何在执行命令后保持 sbt 运行(作为守护进程)

How to keep sbt running (as a daemon process) after executing a command

我想从 sbt 启动 scalatra 服务器。我怎么做?以下确实启动了 scalatra:

sbt "container:start"

但它立即退出:

[info] starting server ...
[success] Total time: 2 s, completed Sep 12, 2015 2:39:32 PM
> [info] waiting for server to shut down...

最好将整个过程 运行 作为守护进程在 nohup 中。

不要在一条线上完成。使用两个命令。

./sbt
container:start
sbt "; <command>; console"

成功了。请注意开头的分号 所必需的。