SBT “package” depend on “test”

南楼画角 提交于 2019-12-20 04:24:19

问题


How do I make target "package" depend on target "test" ?

There is a solution here: Force sbt 0.11 to run tests But it doesn't really work with the xsbt-web-plugin.


回答1:


Here's what I did:

Keys.`package` <<= (test in Test, Keys.`package` in Compile) map { (_, in) =>
  println("after package & test")
  in
}

It runs test, and iff the tests were successful, runs package task. (tested on fresh install of lift-2.5-RC2)



来源:https://stackoverflow.com/questions/15547784/sbt-package-depend-on-test

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