- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我的项目正在使用 Java 1.8
和 maven 3.2.1
我正在使用 Corbetura
插件作为
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
<configuration>
<format>xml</format>
<maxmem>256m</maxmem>
<aggregate>true</aggregate>
<outputDirectory>shippable/codecoverage</outputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit4</artifactId>
<version>2.17</version>
</dependency>
</dependencies>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<reportsDirectory>shippable/testresults</reportsDirectory>
</configuration>
</plugin>
然后我做
mvn clean cobertura:cobertura
我看到了下面的内容
[WARNING]
[WARNING] Some problems were encountered while building the effective settings
[WARNING] 'usePluginRegistry' is deprecated and has no effect. @ /Users/harith/.m2/settings.xml
[WARNING]
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Oauth: Assembling Modules
[INFO] OAuth: Persistence
[INFO] OAuth: Business
[INFO] OAuth: REST
[INFO] OAuth: Integration Tests
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Oauth: Assembling Modules 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ oauth ---
[INFO] Deleting /Users/harith/code/IdeaProjects/others/oauth/target
[INFO]
[INFO] >>> cobertura-maven-plugin:2.6:cobertura (default-cli) @ oauth >>>
[INFO]
[INFO] --- cobertura-maven-plugin:2.6:instrument (default-cli) @ oauth ---
[INFO] Skipping cobertura mojo for project with packaging type 'pom'
[INFO]
[INFO] <<< cobertura-maven-plugin:2.6:cobertura (default-cli) @ oauth <<<
[INFO]
[INFO] --- cobertura-maven-plugin:2.6:cobertura (default-cli) @ oauth ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building OAuth: Persistence 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ persistence ---
[INFO] Deleting /Users/harith/code/IdeaProjects/others/oauth/persistence/target
[INFO]
[INFO] >>> cobertura-maven-plugin:2.6:cobertura (default-cli) @ persistence >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ persistence ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ persistence ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to /Users/harith/code/IdeaProjects/others/oauth/persistence/target/classes
[INFO]
[INFO] --- cobertura-maven-plugin:2.6:instrument (default-cli) @ persistence ---
[INFO] Cobertura 2.0.3 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
[cobertura] WARN [main] net.sourceforge.cobertura.instrument.CoberturaInstrumenter - Unable to instrument file /Users/harith/code/IdeaProjects/others/oauth/persistence/target/generated-classes/cobertura/com/self/oauth/persistence/entities/services/OauthEntityManager.class
java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:147)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:121)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.addInstrumentationToSingleClass(CoberturaInstrumenter.java:234)
at net.sourceforge.cobertura.instrument.Main.addInstrumentationToSingleClass(Main.java:298)
at net.sourceforge.cobertura.instrument.Main.addInstrumentation(Main.java:307)
at net.sourceforge.cobertura.instrument.Main.parseArguments(Main.java:399)
at net.sourceforge.cobertura.instrument.Main.main(Main.java:421)
[cobertura] WARN [main] net.sourceforge.cobertura.instrument.CoberturaInstrumenter - Unable to instrument file /Users/harith/code/IdeaProjects/others/oauth/persistence/target/generated-classes/cobertura/com/self/oauth/persistence/entities/services/OauthEntityManagerProducer.class
java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:147)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:121)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.addInstrumentationToSingleClass(CoberturaInstrumenter.java:234)
at net.sourceforge.cobertura.instrument.Main.addInstrumentationToSingleClass(Main.java:298)
at net.sourceforge.cobertura.instrument.Main.addInstrumentation(Main.java:307)
at net.sourceforge.cobertura.instrument.Main.parseArguments(Main.java:399)
at net.sourceforge.cobertura.instrument.Main.main(Main.java:421)
[cobertura] WARN [main] net.sourceforge.cobertura.instrument.CoberturaInstrumenter - Unable to instrument file /Users/harith/code/IdeaProjects/others/oauth/persistence/target/generated-classes/cobertura/com/self/oauth/persistence/entities/User.class
java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:147)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:121)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.addInstrumentationToSingleClass(CoberturaInstrumenter.java:234)
at net.sourceforge.cobertura.instrument.Main.addInstrumentationToSingleClass(Main.java:298)
at net.sourceforge.cobertura.instrument.Main.addInstrumentation(Main.java:307)
at net.sourceforge.cobertura.instrument.Main.parseArguments(Main.java:399)
at net.sourceforge.cobertura.instrument.Main.main(Main.java:421)
[cobertura] WARN [main] net.sourceforge.cobertura.instrument.CoberturaInstrumenter - Unable to instrument file /Users/harith/code/IdeaProjects/others/oauth/persistence/target/generated-classes/cobertura/com/self/oauth/persistence/entities/UserService.class
java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:147)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:121)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.addInstrumentationToSingleClass(CoberturaInstrumenter.java:234)
at net.sourceforge.cobertura.instrument.Main.addInstrumentationToSingleClass(Main.java:298)
at net.sourceforge.cobertura.instrument.Main.addInstrumentation(Main.java:307)
at net.sourceforge.cobertura.instrument.Main.parseArguments(Main.java:399)
at net.sourceforge.cobertura.instrument.Main.main(Main.java:421)
[ERROR] Aug 13, 2014 11:21:26 AM net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler saveCoverageData
INFO: Cobertura: Saved information on 0 classes.
[INFO] Instrumentation was successful.
[INFO] NOT adding cobertura ser file to attached artifacts list.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ persistence ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ persistence ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /Users/harith/code/IdeaProjects/others/oauth/persistence/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ persistence ---
[INFO] Surefire report directory: /Users/harith/code/IdeaProjects/others/oauth/persistence/shippable/testresults
[INFO] Using configured provider org.apache.maven.surefire.junit4.JUnit4Provider
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.self.oauth.persistence.entities.UserServiceTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.404 sec - in com.self.oauth.persistence.entities.UserServiceTest
Results :
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] <<< cobertura-maven-plugin:2.6:cobertura (default-cli) @ persistence <<<
[INFO]
[INFO] --- cobertura-maven-plugin:2.6:cobertura (default-cli) @ persistence ---
[INFO] Cobertura 2.0.3 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Report time: 40ms
[ERROR] Aug 13, 2014 11:21:28 AM net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler loadCoverageData
INFO: Cobertura: Loaded information on 0 classes.
[INFO] Cobertura Report generation was successful.
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building OAuth: Business 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ business ---
[INFO] Deleting /Users/harith/code/IdeaProjects/others/oauth/business/target
[INFO]
[INFO] >>> cobertura-maven-plugin:2.6:cobertura (default-cli) @ business >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ business ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/harith/code/IdeaProjects/others/oauth/business/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ business ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to /Users/harith/code/IdeaProjects/others/oauth/business/target/classes
[INFO]
[INFO] --- cobertura-maven-plugin:2.6:instrument (default-cli) @ business ---
[INFO] Cobertura 2.0.3 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
[cobertura] WARN [main] net.sourceforge.cobertura.instrument.CoberturaInstrumenter - Unable to instrument file /Users/harith/code/IdeaProjects/others/oauth/business/target/generated-classes/cobertura/com/self/oauth/business/oauth/ClientRegistrationManager.class
java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:147)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:121)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.addInstrumentationToSingleClass(CoberturaInstrumenter.java:234)
at net.sourceforge.cobertura.instrument.Main.addInstrumentationToSingleClass(Main.java:298)
at net.sourceforge.cobertura.instrument.Main.addInstrumentation(Main.java:307)
at net.sourceforge.cobertura.instrument.Main.parseArguments(Main.java:399)
at net.sourceforge.cobertura.instrument.Main.main(Main.java:421)
[cobertura] WARN [main] net.sourceforge.cobertura.instrument.CoberturaInstrumenter - Unable to instrument file /Users/harith/code/IdeaProjects/others/oauth/business/target/generated-classes/cobertura/com/self/oauth/business/oauth/TokenManager.class
java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:147)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:121)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.addInstrumentationToSingleClass(CoberturaInstrumenter.java:234)
at net.sourceforge.cobertura.instrument.Main.addInstrumentationToSingleClass(Main.java:298)
at net.sourceforge.cobertura.instrument.Main.addInstrumentation(Main.java:307)
at net.sourceforge.cobertura.instrument.Main.parseArguments(Main.java:399)
at net.sourceforge.cobertura.instrument.Main.main(Main.java:421)
[cobertura] WARN [main] net.sourceforge.cobertura.instrument.CoberturaInstrumenter - Unable to instrument file /Users/harith/code/IdeaProjects/others/oauth/business/target/generated-classes/cobertura/com/self/oauth/business/oauth/UniqueIdGenerator.class
java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:147)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:121)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.addInstrumentationToSingleClass(CoberturaInstrumenter.java:234)
at net.sourceforge.cobertura.instrument.Main.addInstrumentationToSingleClass(Main.java:298)
at net.sourceforge.cobertura.instrument.Main.addInstrumentation(Main.java:307)
at net.sourceforge.cobertura.instrument.Main.parseArguments(Main.java:399)
at net.sourceforge.cobertura.instrument.Main.main(Main.java:421)
[cobertura] WARN [main] net.sourceforge.cobertura.instrument.CoberturaInstrumenter - Unable to instrument file /Users/harith/code/IdeaProjects/others/oauth/business/target/generated-classes/cobertura/com/self/oauth/business/outbound/ClientDetail.class
java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:147)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:121)
at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.addInstrumentationToSingleClass(CoberturaInstrumenter.java:234)
at net.sourceforge.cobertura.instrument.Main.addInstrumentationToSingleClass(Main.java:298)
at net.sourceforge.cobertura.instrument.Main.addInstrumentation(Main.java:307)
at net.sourceforge.cobertura.instrument.Main.parseArguments(Main.java:399)
at net.sourceforge.cobertura.instrument.Main.main(Main.java:421)
[ERROR] Aug 13, 2014 11:21:29 AM net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler saveCoverageData
INFO: Cobertura: Saved information on 0 classes.
[INFO] Instrumentation was successful.
[INFO] NOT adding cobertura ser file to attached artifacts list.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ business ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ business ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to /Users/harith/code/IdeaProjects/others/oauth/business/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ business ---
[INFO] Surefire report directory: /Users/harith/code/IdeaProjects/others/oauth/business/shippable/testresults
[INFO] Using configured provider org.apache.maven.surefire.junit4.JUnit4Provider
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.self.oauth.business.oauth.ClientRegistrationManagerTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.608 sec - in com.self.oauth.business.oauth.ClientRegistrationManagerTest
Running com.self.oauth.business.oauth.TokenManagerTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.15 sec - in com.self.oauth.business.oauth.TokenManagerTest
Running com.self.oauth.business.oauth.UniqueIdGeneratorTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in com.self.oauth.business.oauth.UniqueIdGeneratorTest
Results :
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building OAuth: Integration Tests 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ integration ---
[INFO] Deleting /Users/harith/code/IdeaProjects/others/oauth/integration/target
[INFO]
[INFO] >>> cobertura-maven-plugin:2.6:cobertura (default-cli) @ integration >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ integration ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ integration ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- sql-maven-plugin:1.5:execute (default) @ integration ---
[INFO] Executing commands
[INFO] 1 of 1 SQL statements executed successfully
[INFO]
[INFO] --- cobertura-maven-plugin:2.6:instrument (default-cli) @ integration ---
[WARNING] No files to instrument.
[INFO] NOT adding cobertura ser file to attached artifacts list.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ integration ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/harith/code/IdeaProjects/others/oauth/integration/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ integration ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to /Users/harith/code/IdeaProjects/others/oauth/integration/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ integration ---
[INFO] Surefire report directory: /Users/harith/code/IdeaProjects/others/oauth/integration/shippable/testresults
[INFO] Using configured provider org.apache.maven.surefire.junit4.JUnit4Provider
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] <<< cobertura-maven-plugin:2.6:cobertura (default-cli) @ integration <<<
[INFO]
[INFO] --- cobertura-maven-plugin:2.6:cobertura (default-cli) @ integration ---
[INFO] Executing aggregate cobertura:report for Oauth: Assembling Modules
Aug 13, 2014 11:21:33 AM net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler loadCoverageData
INFO: Cobertura: Loaded information on 0 classes.
Aug 13, 2014 11:21:33 AM net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler loadCoverageData
INFO: Cobertura: Loaded information on 0 classes.
Aug 13, 2014 11:21:33 AM net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler loadCoverageData
INFO: Cobertura: Loaded information on 0 classes.
[INFO] Saving aggregate cobertura information in /Users/harith/code/IdeaProjects/others/oauth/target/cobertura/cobertura.ser
Aug 13, 2014 11:21:33 AM net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler saveCoverageData
INFO: Cobertura: Saved information on 0 classes.
[INFO] Cobertura 2.0.3 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Report time: 42ms
[ERROR] Aug 13, 2014 11:21:33 AM net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler loadCoverageData
INFO: Cobertura: Loaded information on 0 classes.
[INFO] Cobertura Report generation was successful.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Oauth: Assembling Modules ......................... SUCCESS [ 0.597 s]
[INFO] OAuth: Persistence ................................ SUCCESS [ 3.532 s]
[INFO] OAuth: Business ................................... SUCCESS [ 2.784 s]
[INFO] OAuth: REST ....................................... SUCCESS [ 0.694 s]
[INFO] OAuth: Integration Tests .......................... SUCCESS [ 0.976 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.784 s
[INFO] Finished at: 2014-08-13T11:21:33-08:00
[INFO] Final Memory: 28M/101M
[INFO] --------------------------------------------------------
最后说
Cobertura: Loaded information on 0 classes.
这里有什么问题吗?
最佳答案
更新 05/10/2015:截至目前版本 2.7(显然)支持此功能 - 感谢 @tomasz_kusmierczyk
看起来这是因为 Cobertura 2.0.3 依赖于 ASM 4.1,它不支持 Java 8。我设法通过强制 cobertura-maven-plugin 使用 ASM 5.0.3 来“修复”这个问题,但我不完全确定这是正确的做事方式。然而,它确实消除了所有这些警告。
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
...
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>5.0.3</version>
</dependency>
</dependencies>
</plugin>
正确的方法可能是使用不同的代码覆盖工具,例如 JaCoCo这是为了支持 Java 8。
更新:如果您沿着这条路走下去,看起来您会丢失一些代码覆盖率信息,因此另一个 CC 工具确实是可行的方法。
关于java - CoberturaInstrumenter - 无法检测文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25293433/
今天我在一个 Java 应用程序中看到了几种不同的加载文件的方法。 文件:/ 文件:// 文件:/// 这三个 URL 开头有什么区别?使用它们的首选方式是什么? 非常感谢 斯特凡 最佳答案 file
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引起辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the he
我有一个 javascript 文件,并且在该方法中有一个“测试”方法,我喜欢调用 C# 函数。 c# 函数与 javascript 文件不在同一文件中。 它位于 .cs 文件中。那么我该如何管理 j
需要检查我使用的文件/目录的权限 //filePath = path of file/directory access denied by user ( in windows ) File fil
我在一个目录中有很多 java 文件,我想在我的 Intellij 项目中使用它。但是我不想每次开始一个新项目时都将 java 文件复制到我的项目中。 我知道我可以在 Visual Studio 和
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a software
我有 3 个组件的 Twig 文件: 文件 1: {# content-here #} 文件 2: {{ title-here }} {# content-here #}
我得到了 mod_ldap.c 和 mod_authnz_ldap.c 文件。我需要使用 Linux 命令的 mod_ldap.so 和 mod_authnz_ldap.so 文件。 最佳答案 从 c
我想使用PIE在我的项目中使用 IE7。 但是我不明白的是,我只能在网络服务器上使用 .htc 文件吗? 我可以在没有网络服务器的情况下通过浏览器加载的本地页面中使用它吗? 我在 PIE 的文档中看到
我在 CI 管道中考虑这一点,我应该首先构建和测试我的应用程序,结果应该是一个 docker 镜像。 我想知道使用构建环境在构建服务器上构建然后运行测试是否更常见。也许为此使用构建脚本。最后只需将 j
using namespace std; struct WebSites { string siteName; int rank; string getSiteName() {
我是 Linux 新手,目前正在尝试使用 ginkgo USB-CAN 接口(interface) 的 API 编程功能。为了使用 C++ 对 API 进行编程,他们提供了库文件,其中包含三个带有 .
我刚学C语言,在实现一个程序时遇到了问题将 test.txt 文件作为程序的输入。 test.txt 文件的内容是: 1 30 30 40 50 60 2 40 30 50 60 60 3 30 20
如何连接两个tcpdump文件,使一个流量在文件中出现一个接一个?具体来说,我想“乘以”一个 tcpdump 文件,这样所有的 session 将一个接一个地按顺序重复几次。 最佳答案 mergeca
我有一个名为 input.MP4 的文件,它已损坏。它来自闭路电视摄像机。我什么都试过了,ffmpeg , VLC 转换,没有运气。但是,我使用了 mediainfo和 exiftool并提取以下信息
我想做什么? 我想提取 ISO 文件并编辑其中的文件,然后将其重新打包回 ISO 文件。 (正如你已经读过的) 我为什么要这样做? 我想开始修改 PSP ISO,为此我必须使用游戏资源、 Assets
给定一个 gzip 文件 Z,如果我将其解压缩为 Z',有什么办法可以重新压缩它以恢复完全相同的 gzip 文件 Z?在粗略阅读了 DEFLATE 格式后,我猜不会,因为任何给定的文件都可能在 DEF
我必须从数据库向我的邮件 ID 发送一封带有附件的邮件。 EXEC msdb.dbo.sp_send_dbmail @profile_name = 'Adventure Works Admin
我有一个大的 M4B 文件和一个 CUE 文件。我想将其拆分为多个 M4B 文件,或将其拆分为多个 MP3 文件(以前首选)。 我想在命令行中执行此操作(OS X,但如果需要可以使用 Linux),而
快速提问。我有一个没有实现文件的类的项目。 然后在 AppDelegate 我有: #import "AppDelegate.h" #import "SomeClass.h" @interface A
我是一名优秀的程序员,十分优秀!