RYA-333 Added "-P coverage" to generate code coverage reports. Closes #241.
Project: http://git-wip-us.apache.org/repos/asf/incubator-rya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rya/commit/244b8703 Tree: http://git-wip-us.apache.org/repos/asf/incubator-rya/tree/244b8703 Diff: http://git-wip-us.apache.org/repos/asf/incubator-rya/diff/244b8703 Branch: refs/heads/master Commit: 244b87037a1c96ca7cba6aec0d392a402ebd8340 Parents: 538cfcc Author: jdasch <hcs...@gmail.com> Authored: Tue Oct 10 09:51:51 2017 -0400 Committer: jdasch <hcs...@gmail.com> Committed: Thu Oct 12 12:55:03 2017 -0400 ---------------------------------------------------------------------- extras/shell/pom.xml | 22 ---------------------- pom.xml | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 22 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/244b8703/extras/shell/pom.xml ---------------------------------------------------------------------- diff --git a/extras/shell/pom.xml b/extras/shell/pom.xml index 058f780..a2aedbc 100644 --- a/extras/shell/pom.xml +++ b/extras/shell/pom.xml @@ -123,7 +123,6 @@ <plugin> <groupId>com.mycila</groupId> <artifactId>license-maven-plugin</artifactId> - <version>2.6</version> <configuration> <!-- We use a custome Apache 2.0 license because we do not include a copywrite section. --> <header>src/main/resources/LICENSE.txt</header> @@ -197,27 +196,6 @@ </execution> </executions> </plugin> - - <!-- Generate Code Coverage report. --> - <plugin> - <groupId>org.jacoco</groupId> - <artifactId>jacoco-maven-plugin</artifactId> - <executions> - <execution> - <id>default-prepare-agent</id> - <goals> - <goal>prepare-agent</goal> - </goals> - </execution> - <execution> - <id>default-report</id> - <phase>prepare-package</phase> - <goals> - <goal>report</goal> - </goals> - </execution> - </executions> - </plugin> </plugins> </build> </project> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/244b8703/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index a6415ad..e5c5f5e 100644 --- a/pom.xml +++ b/pom.xml @@ -151,6 +151,54 @@ under the License. <skip.rya.it>false</skip.rya.it> </properties> </profile> + + <!-- Enable this profile to generate a Code Coverage report with jacoco "mvn ... -P coverage" --> + <profile> + <id>coverage</id> + <build> + <plugins> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <executions> + <execution> + <id>default-prepare-agent</id> + <goals> + <goal>prepare-agent</goal> + </goals> + <configuration> + <append>true</append> + </configuration> + </execution> + <execution> + <id>default-report</id> + <phase>prepare-package</phase> + <goals> + <goal>report</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + <!-- Add a reporting section for usage of jacoco with the maven-site-plugin --> + <reporting> + <plugins> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <reportSets> + <reportSet> + <reports> + <!-- select non-aggregate reports --> + <report>report</report> + </reports> + </reportSet> + </reportSets> + </plugin> + </plugins> + </reporting> + </profile> </profiles> <dependencyManagement>