SBT“包"依赖于“测试" [英] SBT "package" depend on "test"
本文介绍了SBT“包"依赖于“测试"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使目标包"依赖于目标测试"?
How do I make target "package" depend on target "test" ?
这里有一个解决方案:强制 sbt 0.11 运行测试但它不适用于 xsbt-web-plugin.
There is a solution here: Force sbt 0.11 to run tests But it doesn't really work with the xsbt-web-plugin.
推荐答案
这就是我所做的:
Keys.`package` <<= (test in Test, Keys.`package` in Compile) map { (_, in) =>
println("after package & test")
in
}
它运行测试,如果测试成功,运行包任务.(在全新安装的 lift-2.5-RC2 上测试)
It runs test, and iff the tests were successful, runs package task. (tested on fresh install of lift-2.5-RC2)
这篇关于SBT“包"依赖于“测试"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文