我在多模块项目中使用sbt 0.13.8和sbt-assembly 0.13.0。一切正常,直到我尝试在组装期间关闭测试为止。
按照文档中的说明,我添加了这一行
test in assembly := {}
在我的一个模块的设置中,得到以下错误
/Users/lanny/work/IdeaProjects/Search/build.sbt:61: error: type mismatch;
found : sbt.TaskKey[sbt.File]
required: java.io.File
test in assembly := {},
^
sbt.compiler.EvalException: Type error in expression
我很乐意显示“检查测试”的结果,但是,las,如果不删除导致错误的行,我将无法运行sbt。这是我删除线后看到的内容。
[info] Set current project to search-hadoop (in build file:/Users/lanny/work/IdeaProjects/Search/)
> inspect assembly::test
[info] Task: Unit
[info] Description:
[info] Executes all tests.
[info] Provided by:
[info] {file:/Users/lanny/work/IdeaProjects/Search/}hadoop/*:assembly::test
[info] Defined at:
[info] (sbtassembly.AssemblyPlugin) AssemblyPlugin.scala:32
[info] Dependencies:
[info] hadoop/test:test
[info] Reverse dependencies:
[info] hadoop/*:assemblyPackageScala::test
[info] hadoop/*:assemblyPackageDependency::test
[info] hadoop/*:assembly
[info] Delegates:
[info] hadoop/*:assembly::test
[info] hadoop/*:test
[info] {.}/*:assembly::test
[info] {.}/*:test
[info] */*:assembly::test
[info] */*:test
[info] Related:
[info] test/*:assemblyPackageDependency::test
[info] third_party/test:test
[info] third_party/*:assemblyPackageDependency::test
[info] search/*:assembly::test
[info] search/*:assemblyPackageScala::test
[info] server/*:assemblyPackageDependency::test
[info] search/*:assemblyPackageDependency::test
[info] server/test:test
[info] hadoop/test:test
[info] hadoop/*:assemblyPackageScala::test
[info] ...
sbt.Keys.test in assembly := {}
绝招。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句