我已经升级了Scala应用程序的Java版本,该版本使用sbt-jacoco
插件运行并检查scalatest
覆盖率。将Java8升级到Java11后,我开始收到以下错误,但在Java8上运行正常。
[error] java.io.IOException: Error while instrumenting class MonthTimeTrigger.class.
[error] at org.jacoco.core.instr.Instrumenter.instrumentError(Instrumenter.java:166)
[error] at org.jacoco.core.instr.Instrumenter.instrument(Instrumenter.java:117)
[error] at org.jacoco.core.instr.Instrumenter.instrument(Instrumenter.java:136)
注意:每当我以前在Scala应用程序中使用任何Java代码并尝试运行sbt jacoco
时,都会遇到上述错误。
当前scala应用程序环境
我已经升级了scala应用程序的Java版本,该版本使用sbt-jacoco插件来运行和检查scalatest覆盖率。将Java8升级到Java11之后,我开始收到错误,它是...
我经过一些研究才找到了解决方案。问题出在sbt-jacoco
插件本身,因为它不支持java10以后。