How to run sbt multiple command in interactive mode

白昼怎懂夜的黑 提交于 2019-12-22 08:34:02

问题


I want to run several sbt-commands within sbt interactive mode, i.e. without leaving the sbt "shell"?

(Note: Some questions answer how to pass argument to sbt-commands using sbt in the standard shell. Not what I wnat here)

Example: I am in sbt interactive shell, and I want to run "test:compile", then "test"

I know test will call required compilation, but in this example I want to run the compilation of all sub-projects, before any test is started.


回答1:


To run commands sequentially within the sbt shell, use ; to chain commands:

> ;test:compile ;test

Note however that running the test task will compile your sources if necessary without you having to explicitly running the compile task.



来源:https://stackoverflow.com/questions/44457452/how-to-run-sbt-multiple-command-in-interactive-mode

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