Repository: hbase Updated Branches: refs/heads/0.98 de27e18eb -> 2e83801c7
HBASE-8808 Use Jacoco to generate Unit Test coverage reports (Manukranth) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/2e83801c Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/2e83801c Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/2e83801c Branch: refs/heads/0.98 Commit: 2e83801c743cf5f03618ad8f09dc2548ce0d1a40 Parents: de27e18 Author: stack <[email protected]> Authored: Fri Oct 3 21:51:49 2014 -0700 Committer: Andrew Purtell <[email protected]> Committed: Sun Oct 5 12:42:05 2014 -0700 ---------------------------------------------------------------------- pom.xml | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/2e83801c/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index ee5ca59..42be9f7 100644 --- a/pom.xml +++ b/pom.xml @@ -510,8 +510,11 @@ using method parallelization class ! --> <testFailureIgnore>${surefire.testFailureIgnore}</testFailureIgnore> <forkedProcessTimeoutInSeconds>${surefire.timeout}</forkedProcessTimeoutInSeconds> - <argLine>${hbase-surefire.argLine}</argLine> + <argLine>${hbase-surefire.argLine} ${argLine}</argLine> <redirectTestOutputToFile>${test.output.tofile}</redirectTestOutputToFile> + <systemPropertyVariables> + <jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile> + </systemPropertyVariables> </configuration> <executions> <execution> @@ -872,6 +875,32 @@ <templateFile>${basedir}/src/main/site/site.vm</templateFile> </configuration> </plugin> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <version>${jacoco.version}</version> + <executions> + <execution> + <id>prepare-agent</id> + <goals> + <goal>prepare-agent</goal> + </goals> + </execution> + <execution> + <id>report</id> + <phase>prepare-package</phase> + <goals> + <goal>report</goal> + </goals> + </execution> + </executions> + <configuration> + <skip>${hbase.skip-jacoco}</skip> + <excludes> + <exclude>**/generated/**/*.class</exclude> + </excludes> + </configuration> + </plugin> </plugins> </build> <properties> @@ -961,6 +990,8 @@ -Djava.security.egd=file:/dev/./urandom -Djava.net.preferIPv4Stack=true "-Djava.library.path=${hadoop.library.path};${java.library.path}" </hbase-surefire.cygwin-argline> + <hbase.skip-jacoco>true</hbase.skip-jacoco> + <jacoco.version>0.6.2.201302030002</jacoco.version> </properties> <!-- Sorted by groups of dependencies then groupId and artifactId --> <dependencyManagement> @@ -1468,7 +1499,7 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> - <argLine>${hbase-surefire.cygwin-argline}</argLine> + <argLine>${hbase-surefire.cygwin-argline} ${argLine}</argLine> <systemProperties> <property> <name>java.net.preferIPv4Stack</name>
