SBT - 为什么在运行时会出现编译错误?

时间:2016-11-22 18:08:22

标签: scala sbt

我正在尝试将两个模块合并为单个模块。两者都成功运行模块。我合并了两个模块。并尝试运行测试用例。 我正在使用sbt命令编译源代码和测试用例:

sbt
clean
compile
project module-read
test:compile
it:test

直到test:compile一切正常,但在它之后:测试,它显示了很多编译问题。

我可以知道最好的编译方式吗?

1 个答案:

答案 0 :(得分:2)

test:compile 任务只会根据默认的sbt测试配置在src / test / scala文件夹中编译测试。

为了编译集成测试(在src / it / scala中),你必须运行 it:compile

有关详细信息,请参阅http://www.scala-sbt.org/0.13.5/docs/Detailed-Topics/Testing.html#integration-tests