1
我想在我的項目上使用Cobertura。我有很多項目,至少有很多測試。作業完成後,coverage.xml文件僅包含測試的最後一個組件的覆蓋信息。 下面是我用的pom.xml文件的摘錄:Jenkins - Cobertura配置
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.3</version>
<configuration>
<formats>
<format>xml</format>
</formats>
<instrumentation>
<excludes>
<exclude>**/Test*.class</exclude>
<exclude>**/*SubProcessAction.class</exclude>
<exclude>**/*ScreenAction.class</exclude>
<exclude>**/*PagingAction.class</exclude>
<exclude>**/MapAction.class</exclude>
<exclude>**/*ProcessMap.class</exclude>
<exclude>**/*ProcessMap$*.class</exclude>
<exclude>**/*PAFAdapter.class</exclude>
<exclude>**/*ProcessHandler.class</exclude>
<exclude>**/*Error.class</exclude>
<exclude>**/*Config.class</exclude>
<exclude>**/*Dialog.class</exclude>
<exclude>**/html_internet/*.class</exclude>
</excludes>
</instrumentation>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>clean</goal>
<goal>cobertura</goal>
</goals>
</execution>
</executions>
<outputDirectory>${env.WORKSPACE}/${env.MAVEN_COBERTURA_REPORT_DIR}/</outputDirectory>
</configuration>
</plugin>
...
對我的錯誤任何想法?這是由於「乾淨」的目標?
預先感謝您的回答...
多米尼克