我想在sbt交互模式下运行几个sbt命令,即不离开sbt“shell”?
(注: Some questions回答如何在标准shell中使用sbt将参数传递给sbt-commands。不是我在这里哇)
示例:我在sbt交互式shell中,我想运行“test:compile”,然后“test”
我知道test会调用所需的编译,但是在这个例子中,我想在开始任何测试之前运行所有子项目的编译。
答案 0 :(得分:4)
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.