Skip to content

Commit

Permalink
[JBQA-6819] The coverage profile is added, running which the jacoco t…
Browse files Browse the repository at this point in the history
…ool is activated for measuring code coverage with testsuit.
  • Loading branch information
andyuk1986 authored and tristantarrant committed Sep 18, 2012
1 parent 424635d commit 16d977b
Showing 1 changed file with 90 additions and 0 deletions.
90 changes: 90 additions & 0 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
<version.org.jboss.staxmapper>1.1.0.Final</version.org.jboss.staxmapper>
<version.maven.bundle>2.3.7</version.maven.bundle>
<version.maven.source>2.1.2</version.maven.source>
<version.jacoco>0.5.10.201208310627</version.jacoco>
</properties>
<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -1124,6 +1125,16 @@
<scalaVersion>${version.scala}</scalaVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${version.jacoco}</version>
<configuration>
<includes>
<include>org.infinispan.*</include>
</includes>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand Down Expand Up @@ -1554,5 +1565,84 @@
<infinispan.test.jgroups.protocol>tcp</infinispan.test.jgroups.protocol>
</properties>
</profile>

<profile>
<id>coverage</id>

<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<inherited>false</inherited>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>jacoco-report</id>
<!-- this must happen after Tomcat has been shut down -->
<phase>verify</phase>
<configuration>
<!-- we use the jacoco ant task because the maven plugin does not
support enough configuration options for report generation -->
<target xmlns:jacoco="antlib:org.jacoco.ant">
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml"
classpathref="maven.plugin.classpath" />
<jacoco:report>
<executiondata>
<fileset dir="..">
<include name="**/jacoco.exec" />
</fileset>
</executiondata>
<structure name="infinispan">
<classfiles>
<fileset dir="..">
<include name="**/target/classes/**/*.class" />
</fileset>
</classfiles>
<sourcefiles encoding="UTF-8">
<dirset dir="..">
<include name="**/src/main/java" />
</dirset>
</sourcefiles>
</structure>
<!-- to produce reports in different formats. -->
<html destdir="target/jacoco-html" />
</jacoco:report>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.ant</artifactId>
<version>${version.jacoco}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 16d977b

Please sign in to comment.