Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregate sonar coverage #420

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: ${{ github.repository == 'focus-shift/jollyday' && 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 @@ -93,20 +94,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>
15 changes: 13 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,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 @@ -295,14 +295,24 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.11</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<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 @@ -370,6 +380,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.27.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>