ActiveJDBC 和 Cobertura 工具
ActiveJDBC and Cobertura instrumentation
我们想使用ActiveJDBC 进行数据库访问。到目前为止,在我们的 IDE 中使用 ActiveJDBC 工具遇到一些小障碍后,一切都按预期进行。
但是,我们使用 Maven 构建项目并使用 Cobertura 报告 Maven 站点构建中的代码覆盖率。 ActiveJDBC 工具和 Cobertura 的代码覆盖工具似乎不能一起玩。
在构建我们的 Maven 站点时,我们在 Cobertura 的代码覆盖率分析期间遇到以下错误:
Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0:site (default-site) on project settings-core:
failed to get report for org.codehaus.mojo:cobertura-maven-plugin: Failed to execute goal org.javalite:activejdbc-instrumentation:1.4.11:instrument (classes) on project settings-core:
Failed to add output directory to classpath:
org.javalite.instrumentation.InstrumentationException: java.lang.RuntimeException: <..>.Setting class is frozen -> [Help 1]
有没有办法让这两个一起玩?
Cobertura 使用字节码检测,ActiveJDBC 也使用字节码检测,这可能会导致冲突。根据我们的经验,JaCoCo 实现了相同的目标并且不与检测冲突:http://eclemma.org/jacoco/trunk/index.html
我们想使用ActiveJDBC 进行数据库访问。到目前为止,在我们的 IDE 中使用 ActiveJDBC 工具遇到一些小障碍后,一切都按预期进行。
但是,我们使用 Maven 构建项目并使用 Cobertura 报告 Maven 站点构建中的代码覆盖率。 ActiveJDBC 工具和 Cobertura 的代码覆盖工具似乎不能一起玩。
在构建我们的 Maven 站点时,我们在 Cobertura 的代码覆盖率分析期间遇到以下错误:
Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0:site (default-site) on project settings-core:
failed to get report for org.codehaus.mojo:cobertura-maven-plugin: Failed to execute goal org.javalite:activejdbc-instrumentation:1.4.11:instrument (classes) on project settings-core:
Failed to add output directory to classpath:
org.javalite.instrumentation.InstrumentationException: java.lang.RuntimeException: <..>.Setting class is frozen -> [Help 1]
有没有办法让这两个一起玩?
Cobertura 使用字节码检测,ActiveJDBC 也使用字节码检测,这可能会导致冲突。根据我们的经验,JaCoCo 实现了相同的目标并且不与检测冲突:http://eclemma.org/jacoco/trunk/index.html