SLING-6186 - Add support for checking code coverage with jacoco

* configured jacoco for all HTL modules that provide unit tests
* IT code coverage can be obtained from the testing module

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1766545 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index 94f6571..a522534 100644
--- a/pom.xml
+++ b/pom.xml
@@ -110,6 +110,43 @@
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>coverage-report</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.jacoco</groupId>
+                        <artifactId>jacoco-maven-plugin</artifactId>
+                        <version>0.7.7.201606060606</version>
+                        <executions>
+                            <execution>
+                                <id>default-prepare-agent</id>
+                                <goals>
+                                    <goal>prepare-agent</goal>
+                                </goals>
+                            </execution>
+                            <execution>
+                                <id>default-report</id>
+                                <goals>
+                                    <goal>report</goal>
+                                </goals>
+                                <configuration>
+                                    <includes>
+                                        <include>org/apache/sling/scripting/sightly/**/*</include>
+                                    </includes>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
     <!-- ======================================================================= -->
     <!-- D E P E N D E N C I E S                                                 -->
     <!-- ======================================================================= -->