- <!-- JACOCO CODE COVERAGE PLUGIN -->
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <version>${jacoco.plugin.version}</version>
- <configuration>
- <excludes>
- <!-- Exclude all test classes for code coverage reports -->
- <exclude>**/test/**</exclude>
- <!-- Exclude all domain classes as they should only contain domain objects, no logic -->
- <exclude>**/domain/**</exclude>
- <!-- Exclude all facade classes as they should only contain facade objects, no logic -->
- <exclude>**/facade/**</exclude>
- <!-- Exclude mixin class for code coverage as they are just for json parsing hints -->
- <exclude>**/mixin/**</exclude>
- <!-- Exclude classes ending with "Constants" as they should only store static constants -->
- <exclude>**/*Constants.*</exclude>
- <!-- Exclude classes ending with "Module" as they are used for wiring beans by guice -->
- <exclude>**/*Module.*</exclude>
- <!-- Exclude classes ending with "Exception" as they are mostly wrapper over java
- exceptions -->
- <exclude>**/*Exception.*</exclude>
- <!-- Exclude classes ending with "Entity" as they should not contain any logic -->
- <exclude>**/*Entity.*</exclude>
- </excludes>
- </configuration>
- <executions>
- <!-- prepare jacoco agent before unit tests -->
- <execution>
- <id>pre-unit-test</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- <configuration>
- <destFile>${jacoco.ut.execution.data.file}</destFile>
- <propertyName>surefireArgLine</propertyName>
- </configuration>
- </execution>
- <!-- generate unit test coverage report -->
- <execution>
- <id>post-unit-test</id>
- <phase>test</phase>
- <goals>
- <goal>report</goal>
- </goals>
- <configuration>
- <dataFile>${jacoco.ut.execution.data.file}</dataFile>
- <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
- </configuration>
- </execution>
- <!-- prepare jacoco agent before integration tests -->
- <execution>
- <id>pre-integration-test</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- <configuration>
- <destFile>${jacoco.it.execution.data.file}</destFile>
- <propertyName>failsafeArgLine</propertyName>
- </configuration>
- </execution>
- <!-- generate integration test coverage report -->
- <execution>
- <id>post-integration-test</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>report</goal>
- </goals>
- <configuration>
- <dataFile>${jacoco.it.execution.data.file}</dataFile>
- <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
-