trivial: optimised jacoco configuration
diff --git a/pom.xml b/pom.xml
index 1658fe0..3070673 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,7 +53,6 @@
12343846,12344079,12344332,12344876,12345571</site.jira.version.id>
<maven.version>3.3.9</maven.version>
<maven.site.path>${project.artifactId}-archives/${project.artifactId}-LATEST</maven.site.path>
- <jacoco.version>0.8.3</jacoco.version>
<sightly.runtime.version>1.1.1-1.4.0-SNAPSHOT</sightly.runtime.version>
<sightly.compiler.version>1.2.0-1.4.0-SNAPSHOT</sightly.compiler.version>
<sightly.compiler.java.version>1.1.3-1.4.0-SNAPSHOT</sightly.compiler.java.version>
@@ -177,12 +176,6 @@
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.jacoco</groupId>
- <artifactId>org.jacoco.agent</artifactId>
- <version>${jacoco.version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
@@ -263,63 +256,60 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <version>${jacoco.version}</version>
- <executions>
- <execution>
- <id>default-prepare-agent</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- </execution>
- <execution>
- <id>check-coverage</id>
- <goals>
- <goal>check</goal>
- </goals>
- <configuration>
- <haltOnFailure>true</haltOnFailure>
- <rules>
- <rule>
- <element>BUNDLE</element>
- <limits>
- <limit>
- <counter>INSTRUCTION</counter>
- <value>COVEREDRATIO</value>
- <minimum>0.80</minimum>
- </limit>
- </limits>
- </rule>
- <rule>
- <element>CLASS</element>
- <limits>
- <limit>
- <counter>INSTRUCTION</counter>
- <value>COVEREDRATIO</value>
- <minimum>0.80</minimum>
- </limit>
- </limits>
- </rule>
- </rules>
- <excludes>
- <exclude>org/apache/sling/maven/htl/HelpMojo.class</exclude>
- </excludes>
- </configuration>
- </execution>
- <execution>
- <id>report</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>report</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>jacoco-report</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>check-coverage</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <configuration>
+ <dataFile>${project.build.directory}/jacoco-merged.exec</dataFile>
+ <haltOnFailure>true</haltOnFailure>
+ <rules>
+ <rule>
+ <element>BUNDLE</element>
+ <limits>
+ <limit>
+ <counter>INSTRUCTION</counter>
+ <value>COVEREDRATIO</value>
+ <minimum>0.80</minimum>
+ </limit>
+ </limits>
+ </rule>
+ <rule>
+ <element>CLASS</element>
+ <limits>
+ <limit>
+ <counter>INSTRUCTION</counter>
+ <value>COVEREDRATIO</value>
+ <minimum>0.80</minimum>
+ </limit>
+ </limits>
+ </rule>
+ </rules>
+ <excludes>
+ <exclude>org/apache/sling/maven/htl/HelpMojo.class</exclude>
+ </excludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
<reporting>
<plugins>
<plugin>