Revert from JaCoCo to Cobertura (better ignore functionality in

Cobertura)
This commit is contained in:
James Agnew 2015-09-15 14:34:06 -04:00
parent 73121e222c
commit 4a7a9e4e4b
3 changed files with 71 additions and 18 deletions

View File

@ -19,6 +19,6 @@ before_script:
- export MAVEN_SKIP_RC=true - export MAVEN_SKIP_RC=true
script: script:
- mvn -B clean install && cd hapi-fhir-cobertura && mvn -B -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID -P COBERTURA clean test jacoco:report coveralls:report - mvn -B clean install && cd hapi-fhir-cobertura && mvn -B -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID -P COBERTURA clean cobertura:cobertura coveralls:report

View File

@ -176,10 +176,36 @@
<skipDeploy>true</skipDeploy> <skipDeploy>true</skipDeploy>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <configuration> <skip>false</skip> <formats> <format>html</format> <format>xml</format> </formats> <groupId>org.codehaus.mojo</groupId>
<maxmem>256m</maxmem> <instrumentation> <ignores> <ignore>ca.uhn.fhir.model.dstu.valueset.*</ignore> </ignores> <excludes> <ignore>**/valueset/*.class</ignore> <ignore>**/exceptions/*.class</ignore> </excludes> <artifactId>cobertura-maven-plugin</artifactId>
</instrumentation> </configuration> <executions> <execution> <phase>verify</phase> <goals> <goal>check</goal> </goals> </execution> </executions> </plugin> --> <configuration>
<skip>false</skip>
<formats>
<format>html</format>
<format>xml</format>
</formats>
<maxmem>256m</maxmem>
<instrumentation>
<ignores>
<ignore>ca.uhn.fhir.model.dstu.valueset.*</ignore>
</ignores>
<excludes>
<ignore>**/valueset/*.class</ignore>
<ignore>**/exceptions/*.class</ignore>
</excludes>
<!-- <ignoreMethodAnnotations> <ignoreMethodAnnotation>net.sourceforge.cobertura.CoverageIgnore</ignoreMethodAnnotation> </ignoreMethodAnnotations> -->
</instrumentation>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
<plugins> <plugins>
@ -188,6 +214,11 @@
<artifactId>coveralls-maven-plugin</artifactId> <artifactId>coveralls-maven-plugin</artifactId>
<version>3.1.0</version> <version>3.1.0</version>
<configuration> <configuration>
<coberturaReports>
<coberturaReport>
${basedir}/target/coverage.xml
</coberturaReport>
</coberturaReports>
<sourceEncoding>UTF-8</sourceEncoding> <sourceEncoding>UTF-8</sourceEncoding>
<serviceName>travis-ci</serviceName> <serviceName>travis-ci</serviceName>
<serviceJobId>${env.TRAVIS_JOB_ID}</serviceJobId> <serviceJobId>${env.TRAVIS_JOB_ID}</serviceJobId>
@ -241,7 +272,7 @@
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<runOrder>alphabetical</runOrder> <runOrder>alphabetical</runOrder>
<argLine>-Xms512m -Xmx1024m ${argLine}</argLine> <argLine>-Xms512m -Xmx1024m</argLine>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@ -260,25 +291,26 @@
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.jacoco</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>jacoco-maven-plugin</artifactId> <artifactId>cobertura-maven-plugin</artifactId>
<version>0.7.5.201505241946</version> <configuration>
<check>
<haltOnFailure>true</haltOnFailure>
</check>
</configuration>
<executions> <executions>
<execution> <execution>
<id>prepare-agent</id> <phase>verify</phase>
<goals> <goals>
<goal>prepare-agent</goal> <goal>check</goal>
</goals>
</execution>
<execution>
<id>jacoco-site</id>
<phase>post-integration-test</phase>
<goals>
<goal>report</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>${maven_cobertura_plugin_version}</version> <configuration> <check> <branchRate>85</branchRate>
<lineRate>85</lineRate> <haltOnFailure>true</haltOnFailure> <totalBranchRate>85</totalBranchRate> <totalLineRate>85</totalLineRate> <packageLineRate>85</packageLineRate> <packageBranchRate>85</packageBranchRate>
<regexes> <regex> <pattern>com.example.reallyimportant.*</pattern> <branchRate>90</branchRate> <lineRate>80</lineRate> </regex> <regex> <pattern>com.example.boringcode.*</pattern> <branchRate>40</branchRate>
<lineRate>30</lineRate> </regex> </regexes> </check> </configuration> <executions> <execution> <goals> <goal>clean</goal> <goal>check</goal> </goals> </execution> </executions> </plugin> -->
</plugins> </plugins>
<resources> <resources>
</resources> </resources>
@ -299,6 +331,22 @@
</build> </build>
<reporting> <reporting>
<plugins> <plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<reportSets>
<reportSet>
<reports>
<report>cobertura</report>
</reports>
<configuration>
<check>
<haltOnFailure>true</haltOnFailure>
</check>
</configuration>
</reportSet>
</reportSets>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId> <artifactId>maven-project-info-reports-plugin</artifactId>

View File

@ -615,6 +615,11 @@
<artifactId>maven-war-plugin</artifactId> <artifactId>maven-war-plugin</artifactId>
<version>2.6</version> <version>2.6</version>
</plugin> </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId> <artifactId>animal-sniffer-maven-plugin</artifactId>