在sbt shell中更改源目录

时间:2014-03-17 11:40:35

标签: sbt

我想更改测试文件的源目录,但只是暂时在当前会话中。我尝试了以下方法:

> scalaSource in Test := baseDirectory.value / "test-src"

[error] Expected ID character
[error] Not a valid command: scalaSource
[error] Expected project ID
[error] Expected configuration
[error] Expected ':' (if selecting a configuration)
[error] Expected key
[error] Expected '::'
[error] Expected end of input.
[error] scalaSource in Test := baseDirectory.value / "test-src"

1 个答案:

答案 0 :(得分:2)

在sbt shell中,您需要使用set command将更改应用于当前项目的设置:

> set scalaSource in Test := baseDirectory.value / "test-src"

如果您想将session save留在build.sbt,则可以使用{{1}}。