Skip to content

Commit

Permalink
configure output directories for failsafe and surefire
Browse files Browse the repository at this point in the history
  • Loading branch information
GordeaS authored and GordeaS committed Mar 18, 2024
1 parent 7e36370 commit a703958
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<!-- Exclude POJOs code duplication analysis -->
<sonar.cpd.exclusions>**/model/**/*</sonar.cpd.exclusions>
<aggregate.report.xml>build/reports/jacoco/test/jacocoTestReport.xml</aggregate.report.xml>
<!-- see https://github.com/SaurabhDev/Demo-Java-Sonar-Maven/tree/master -->
<aggregate.report.xml>reports/jacoco/test/jacocoTestReport.xml</aggregate.report.xml>
<sonar.coverage.jacoco.xmlReportPaths>${aggregate.report.xml}</sonar.coverage.jacoco.xmlReportPaths>


Expand Down
30 changes: 22 additions & 8 deletions set-integration-testing/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>set-api</artifactId>
Expand All @@ -11,19 +13,21 @@
<artifactId>set-integration-testing</artifactId>
<packaging>jar</packaging>

<name>Europeana (User) Sets - Integration Testing</name>
<name>Europeana (User) Sets - Integration Testing</name>
<description>Module containing integration tests</description>

<properties>
<!-- Sonar - jacoco xmlReportPaths needs to be defined in each module -->
<sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../${aggregate.report.xml}</sonar.coverage.jacoco.xmlReportPaths>
<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../${aggregate.report.xml}</sonar.coverage.jacoco.xmlReportPaths>
</properties>


<dependencyManagement>
<dependencies>
<dependency>
<!-- Import dependency management from Spring Boot (because we don't use Spring-Boot as parent pom)-->
<!-- Import dependency management from Spring Boot (because we
don't use Spring-Boot as parent pom)-->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${version.springBoot}</version>
Expand Down Expand Up @@ -59,7 +63,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>commons-io</groupId>
Expand All @@ -85,21 +89,21 @@
<artifactId>spring-boot-test-autoconfigure</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mongodb</artifactId>
<version>${version.testcontainers}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${version.testcontainers}</version>
<scope>test</scope>
</dependency>

</dependencies>


Expand All @@ -112,6 +116,16 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<reportsDirectory>${sonar.coverage.jacoco.xmlReportPaths}</reportsDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<reportsDirectory>${sonar.coverage.jacoco.xmlReportPaths}</reportsDirectory>
</configuration>
</plugin>

<!-- sonar coverage report aggregation -->
Expand Down

0 comments on commit a703958

Please sign in to comment.