我正在为一个用 Play Framework 编写的项目使用sbt-scoverage插件。
我面临以下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......
我的猜测是它试图service-main.js
从target
下面的某个地方转移scoverage-classes
。我不打算对任何 JavaScript 文件运行覆盖,因此我包含了以下设置:
ScoverageKeys.excludedPackages in ScoverageCompile := ".views.;.javascripts.;.assets.;.js.;.resource_managed."
它没有任何改变 - 错误仍然存在。如何指示 scoverage 忽略 JavaScript 文件?