scala 如何在 SBT 版本中跳过测试?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9763543/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I skip tests in an SBT build?
提问by trustin
I have an SBT 0.7.5 project and its some test cases fail. Until all test cases are fixed, I want to skip tests to generate a JAR. Is there any command line argument that tells SBT to skip all tests, like Maven's -Dmaven.test.skip=trueflag?
我有一个 SBT 0.7.5 项目,它的一些测试用例失败了。在修复所有测试用例之前,我想跳过测试以生成 JAR。是否有任何命令行参数告诉 SBT 跳过所有测试,例如 Maven 的-Dmaven.test.skip=true标志?
采纳答案by myborobudur
Instead of using compile, you could use package. The compile tasks also runs the tests, package doesn't.
而不是使用的compile,你可以使用package。编译任务也运行测试,包不运行。
回答by OlliM
I had the same problem, I'm using the assembly plugin. In this case, the solution was to modify the build file and add
我遇到了同样的问题,我正在使用程序集插件。在这种情况下,解决方案是修改构建文件并添加
test in assembly := {}

