...
- copy jacoco properties and plugins configurations (https://gerrit.onap.org/r/c/policy/parent/+/137695/1/integration/pom.xml and https://gerrit.onap.org/r/c/policy/parent/+/137724/1/integration/pom.xml)
NOTE: policy only have unit tests for sonar; if there are distincts tests for unit and integration and they generate different reports, adjust the plugin configuration accordingly.
Code Block | ||
---|---|---|
| ||
<properties> . . <jacoco.destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</jacoco.destFile> . . </properties> <plugins> ... <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>${version.jacoco}</version> <configuration> <excludes> <exclude>org/drools/**/*</exclude> <exclude>**/gen/**</exclude> <exclude>**/generated-sources/**</exclude> </excludes> <output>file</output> </configuration> <executions> <execution> <id>pre-unit-test</id> <goals> <goal>prepare-agent</goal> </goals> <configuration> <destFile>${jacoco.destFile}</destFile> <append>true</append> <propertyName>surefireArgLine</propertyName> </configuration> </execution> <execution> <id>post-unit-test</id> <phase>test</phase> <goals> <goal>report</goal> </goals> <configuration> <dataFile>${jacoco.destFile}</dataFile> <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory> </configuration> </execution> <execution> <id>report-aggregate</id> <phase>verify</phase> <goals> <goal>report-aggregate</goal> </goals> <configuration> <includeCurrentProject>true</includeCurrentProject> </configuration> </execution> </executions> </plugin> ... </plugins> |
...