Skip to content

Commit

Permalink
Merge pull request #317 from europeana/EA-3788_index_created_modified
Browse files Browse the repository at this point in the history
fix code coverage computation
  • Loading branch information
gsergiu authored Mar 27, 2024
2 parents b34731a + 6a6f104 commit 1446106
Show file tree
Hide file tree
Showing 8 changed files with 572 additions and 532 deletions.
2 changes: 1 addition & 1 deletion entity-management-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<description>Common functionality to be reused by individual Entity Management Modules</description>

<properties>
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.xml}
<sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../${aggregate.report.xml}
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion entity-management-definitions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<packaging>jar</packaging>

<properties>
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.xml}
<sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../${aggregate.report.xml}
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion entity-management-mongo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<name>entity-management-mongo</name>

<properties>
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.xml}</sonar.coverage.jacoco.xmlReportPaths>
<sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../${aggregate.report.xml}</sonar.coverage.jacoco.xmlReportPaths>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion entity-management-solr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<description>A simple entity-management-solr.</description>

<properties>
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.xml}</sonar.coverage.jacoco.xmlReportPaths>
<sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../${aggregate.report.xml}</sonar.coverage.jacoco.xmlReportPaths>
</properties>

<dependencies>
Expand Down
329 changes: 180 additions & 149 deletions entity-management-tests/pom.xml
Original file line number Diff line number Diff line change
@@ -1,165 +1,196 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>entity-management</artifactId>
<groupId>eu.europeana.api</groupId>
<version>1.6.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>entity-management</artifactId>
<groupId>eu.europeana.api</groupId>
<version>1.6.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>entity-management-tests</artifactId>
<properties>
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.xml}
</sonar.coverage.jacoco.xmlReportPaths>
</properties>
<artifactId>entity-management-tests</artifactId>
<properties>
<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../${aggregate.report.xml}
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

<dependencies>
<dependency>
<groupId>eu.europeana.api</groupId>
<artifactId>entity-management-web</artifactId>
<version>1.6.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>eu.europeana.api</groupId>
<artifactId>entity-management-definitions</artifactId>
<version>1.6.4-SNAPSHOT</version>
</dependency>
<dependencies>
<dependency>
<groupId>eu.europeana.api</groupId>
<artifactId>entity-management-web</artifactId>
<version>1.6.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>eu.europeana.api</groupId>
<artifactId>entity-management-definitions</artifactId>
<version>1.6.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>eu.europeana.api</groupId>
<artifactId>entity-management-common</artifactId>
<version>1.6.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>eu.europeana.api</groupId>
<artifactId>entity-management-mongo</artifactId>
<version>1.6.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>eu.europeana.api</groupId>
<artifactId>entity-management-solr</artifactId>
<version>1.6.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>eu.europeana.api</groupId>
<artifactId>entity-management-zoho</artifactId>
<version>1.6.4-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>eu.europeana.api</groupId>
<artifactId>entity-management-common</artifactId>
<version>1.6.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<!-- use log4j2 instead -->
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>

<dependency>
<groupId>eu.europeana.api</groupId>
<artifactId>entity-management-mongo</artifactId>
<version>1.6.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>${swagger.version}</version>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>

<dependency>
<groupId>eu.europeana.api</groupId>
<artifactId>entity-management-solr</artifactId>
<version>1.6.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>eu.europeana.api</groupId>
<artifactId>entity-management-zoho</artifactId>
<version>1.6.4-SNAPSHOT</version>
</dependency>
<!--testcontainers for integration testing-->
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<!-- use log4j2 instead -->
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>${swagger.version}</version>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
<dependency>
<groupId>eu.europeana.api.commons</groupId>
<artifactId>commons-web</artifactId>
<version>${api.commons.version}</version>
<exclusions>
<exclusion>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
</exclusion>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>

<!--testcontainers for integration testing-->
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-plugin.version}</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
<!-- include the reports from all modules -->
<configuration>
<dataFileIncludes>
<dataFileInclude>**/jacoco.exec</dataFileInclude>
</dataFileIncludes>
<outputDirectory>
${project.reporting.outputDirectory}/jacoco-aggregate
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>

<dependency>
<groupId>eu.europeana.api.commons</groupId>
<artifactId>commons-web</artifactId>
<version>${api.commons.version}</version>
<exclusions>
<exclusion>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
</exclusion>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${failsafe.version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>

<!-- useModulePath = false Fixes Integration test not
finding beans. May
be
removed with 3.0.0-M6 is available
See: https://stackoverflow.com/a/65806777/14530159 -->
<configuration>
<useModulePath>false</useModulePath>
</configuration>

<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<scope>test</scope>
</dependency>

</dependencies>
<profiles>
<profile>
<id>coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-plugin.version}</version>
<executions>
<execution>
<id>report</id>
<goals>
<goal>report-aggregate</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
2 changes: 1 addition & 1 deletion entity-management-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<packaging>jar</packaging>

<properties>
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.xml}</sonar.coverage.jacoco.xmlReportPaths>
<sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../${aggregate.report.xml}</sonar.coverage.jacoco.xmlReportPaths>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion entity-management-zoho/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<artifactId>entity-management-zoho</artifactId>

<properties>
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.xml}
<sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../${aggregate.report.xml}
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
Loading

0 comments on commit 1446106

Please sign in to comment.