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

佐手、 提交于 2019-12-22 09:23:07

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!