我爲使用Play Framework編寫的項目使用sbt-scoverage插件。爲什麼sbt-scoverage報告java.lang.RuntimeException:JavaScript文件的重複映射?
我面臨着以下java.lang.RuntimeException: Duplicate mappings
錯誤:
[scoverage]: Instrumentation completed [35097 statements]
[scoverage]: Written instrumentation file [/Users/project/target/scala-2.10/scoverage-data/scoverage.coverage.xml]
[scoverage]: Writing measurements data to [/Users/project/target/scala-2.10/scoverage-data]
...
[info] Compiling 49 Scala sources to /Users/project/target/scala-2.10/test-classes...
java.lang.RuntimeException: Duplicate mappings:
/Users/project/target/scala-2.10/scoverage-classes/services-main.js
from
/Users/project/target/scala-2.10/resource_managed/main/public/javascripts/global/services/services-main.js
/Users/project/target/scala-2.10/resource_managed/main/public/javascripts/kiosk/global/services/services-main.js
/Users/project/target/scala-2.10/scoverage-classes/global.min.css
from......
我的猜測是,它試圖從某處target
轉移service-main.js
scoverage-classes
下。我不打算scoverage運行對任何JavaScript文件,所以我包括以下設置:
ScoverageKeys.excludedPackages in ScoverageCompile := ".views.;.javascripts.;.assets.;.js.;.resource_managed."
它改變不了什麼 - 錯誤仍然存在。我如何指示scoverage忽略JavaScript文件?
這是一個多模塊項目嗎? 'app/assets/javascripts' **和**'app/assets/javascripts/kiosk'文件夾下有'services-main.js'嗎? kiosk文件夾從哪裏來?你使用'sbt-rjs'嗎?那麼'project/plugins.sbt'呢? –