- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <version>0.7.6.201602180812</version>
- <executions>
- <execution>
- <id>prepare-agent</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- <phase>test</phase>
- <configuration>
- <destFile>${sonar.jacoco.reportPath}</destFile>
- <skip>${skipCoverage}</skip>
- </configuration>
- </execution>
- <execution>
- <id>report</id>
- <goals>
- <goal>report</goal>
- </goals>
- <phase>test</phase>
- <configuration>
- <dataFile>${sonar.jacoco.reportPath}</dataFile>
- <outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
- <skip>${skipCoverage}</skip>
- </configuration>
- </execution>
- <!-- Integration Tests (Only report goal) -->
- <execution>
- <id>report-integration</id>
- <goals>
- <goal>report-integration</goal>
- </goals>
- <configuration>
- <dataFile>${sonar.jacoco.itReportPath}</dataFile>
- <outputDirectory>${project.basedir}/target/site/it-jacoco</outputDirectory>
- <skip>${skipCoverage}</skip>
- </configuration>
- </execution>
- <!-- Will see build errors while running the test cases because of dual
- instrumentation -->
- <execution>
- <id>default-instrument</id>
- <goals>
- <goal>instrument</goal>
- </goals>
- <configuration>
- <skip>${skipCoverage}</skip>
- </configuration>
- </execution>
- <execution>
- <id>default-restore-instrumented-classes</id>
- <goals>
- <goal>restore-instrumented-classes</goal>
- </goals>
- <configuration>
- <skip>${skipCoverage}</skip>
- </configuration>
- </execution>
- </executions>
- </plugin>
-