Skip to content

Commit ffe88a6

Browse files
committed
fix: Force sonar plugin to use the XML JaCoCo report
1 parent 72e567e commit ffe88a6

File tree

2 files changed

+23
-12
lines changed

2 files changed

+23
-12
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,19 @@ jobs:
9393
- name: Set artifact version
9494
run: script/version_snapshot.sh
9595
shell: bash
96+
- name: Cache Maven dependencies
97+
timeout-minutes: 10
98+
uses: actions/cache@v1
99+
with:
100+
path: ~/.m2
101+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
102+
restore-keys: ${{ runner.os }}-m2
96103
- name: SonarCloud scan of ${{ github.ref }}
97104
run: mvn -P jacoco -B -Dsonar.projectKey=jsonurl_jsonurl-java -Dsonar.organization=jsonurl -Dsonar.host.url=https://sonarcloud.io package sonar:sonar
98105
env:
99106
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100107
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
108+
- name: Collect debugging info
109+
run: ls -lR
110+
101111

module/pom.xml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@
5454
<maven.site.plugin>3.8.2</maven.site.plugin>
5555
<maven.doxia.plugin>[1.9,)</maven.doxia.plugin>
5656
<maven.project.info.reports.plugin>2.9</maven.project.info.reports.plugin>
57-
<nexus.staging.pluggin>1.6.8</nexus.staging.pluggin>
58-
<codehaus.versions.pluggin>2.7</codehaus.versions.pluggin>
57+
<nexus.staging.plugin>1.6.8</nexus.staging.plugin>
58+
<codehaus.versions.plugin>2.7</codehaus.versions.plugin>
59+
<sonar.maven.plugin>3.7.0.1746</sonar.maven.plugin>
5960
<nexus.url>https://oss.sonatype.org</nexus.url>
6061

61-
<junit.version>[5.4,)</junit.version>
62+
<junit.version>5.6.2</junit.version>
6263
<jsonurl.description>
6364
RFC8259 describes the JSON data model and interchange format,
6465
which is widely used in application-level protocols including RESTful
@@ -76,6 +77,7 @@
7677
<checkstyle.config.location>../../config/checkstyle.xml</checkstyle.config.location>
7778
<pmd.config.location>../../config/pmd-ruleset.xml</pmd.config.location>
7879
<jacoco.minimum.coverage>0.40</jacoco.minimum.coverage>
80+
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/target/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
7981
</properties>
8082

8183
<description>
@@ -120,13 +122,7 @@
120122
<dependencies>
121123
<dependency>
122124
<groupId>org.junit.jupiter</groupId>
123-
<artifactId>junit-jupiter-engine</artifactId>
124-
<version>${junit.version}</version>
125-
<scope>test</scope>
126-
</dependency>
127-
<dependency>
128-
<groupId>org.junit.jupiter</groupId>
129-
<artifactId>junit-jupiter-params</artifactId>
125+
<artifactId>junit-jupiter</artifactId>
130126
<version>${junit.version}</version>
131127
<scope>test</scope>
132128
</dependency>
@@ -279,7 +275,7 @@
279275
<plugin>
280276
<groupId>org.sonatype.plugins</groupId>
281277
<artifactId>nexus-staging-maven-plugin</artifactId>
282-
<version>${nexus.staging.pluggin}</version>
278+
<version>${nexus.staging.plugin}</version>
283279
<extensions>true</extensions>
284280
<configuration>
285281
<serverId>ossrh</serverId>
@@ -290,7 +286,12 @@
290286
<plugin>
291287
<groupId>org.codehaus.mojo</groupId>
292288
<artifactId>versions-maven-plugin</artifactId>
293-
<version>${codehaus.versions.pluggin}</version>
289+
<version>${codehaus.versions.plugin}</version>
290+
</plugin>
291+
<plugin>
292+
<groupId>org.sonarsource.scanner.maven</groupId>
293+
<artifactId>sonar-maven-plugin</artifactId>
294+
<version>${sonar.maven.plugin}</version>
294295
</plugin>
295296
</plugins>
296297
</pluginManagement>

0 commit comments

Comments
 (0)