RYA-333 Added "-P coverage" to generate code coverage reports. Closes
#241.
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>
diff --git a/pom.xml b/pom.xml
index a6415ad..e5c5f5e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -151,6 +151,54 @@
<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>