Skip to content

Commit

Permalink
Fix sonar coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
derTobsch committed Jan 12, 2024
1 parent 34ae1a6 commit a7a7191
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 20 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ jobs:
- name: Analyse with SonarCloud
if: ${{ matrix.java == 17 && matrix.os == 'ubuntu-latest' && (github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')) }}
run: >
./mvnw -Pcoverage verify
sonar:sonar
./mvnw -Pcoverage sonar:sonar
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=focus-shift
-Dsonar.projectKey=focus-shift_jollyday
Expand Down
1 change: 1 addition & 0 deletions jollyday-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>jollyday-core</artifactId>

<name>Jollyday Core</name>
<description>
Core module of the jollyday library that contains the API for the developers and
Expand Down
2 changes: 1 addition & 1 deletion jollyday-jackson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>jollyday-jackson</artifactId>
<name>Jollyday with Jackson</name>

<name>Jollyday with Jackson</name>
<description>Jackson based jollyday implementation</description>

<parent>
Expand Down
2 changes: 1 addition & 1 deletion jollyday-jaxb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>jollyday-jaxb</artifactId>
<name>Jollyday with Jakarta XML Binding (JAXB)</name>

<name>Jollyday with Jakarta XML Binding (JAXB)</name>
<description>Jakarta XML Binding (JAXB) based jollyday implementation</description>

<parent>
Expand Down
15 changes: 1 addition & 14 deletions jollyday-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>jollyday-tests</artifactId>

<name>Jollyday Tests</name>

<parent>
Expand Down Expand Up @@ -83,20 +84,6 @@
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>report</id>
<goals>
<goal>report-aggregate</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
16 changes: 14 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

<!--suppress UnresolvedMavenProperty - for IDEA-->
<sonar.coverage.jacoco.xmlReportPaths>
${maven.multiModuleProjectDirectory}/jollyday-tests/target/site/jacoco-aggregate/jacoco.xml
${project.basedir}/target/site/jacoco-aggregate/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down Expand Up @@ -169,7 +169,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.11</version>
<version>0.8.10</version>
</plugin>

<plugin>
Expand Down Expand Up @@ -286,6 +286,17 @@
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
<configuration>
<formats>
<format>XML</format>
</formats>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down Expand Up @@ -353,6 +364,7 @@
</activation>
<modules>
<module>jollyday-tests</module>
<module>report-aggregate</module>
</modules>
</profile>

Expand Down
54 changes: 54 additions & 0 deletions report-aggregate/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>

<artifactId>report-aggregate</artifactId>
<name>Aggregate Coverage Report</name>

<description>Aggregate Coverage Report</description>

<parent>
<groupId>de.focus-shift</groupId>
<artifactId>jollyday</artifactId>
<version>0.24.0-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>de.focus-shift</groupId>
<artifactId>jollyday-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>de.focus-shift</groupId>
<artifactId>jollyday-jackson</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>de.focus-shift</groupId>
<artifactId>jollyday-jaxb</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>report-aggregate</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit a7a7191

Please sign in to comment.