Skip to content

Commit f2ab0c9

Browse files
SONARJAVA-5942 Fix CI: use Java 21 in plugin QA and bump SpotBugs to 4.9.8.2 (#5384)
1 parent 07521ba commit f2ab0c9

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,13 @@ jobs:
9696
strategy:
9797
fail-fast: false
9898
matrix:
99-
sq_version:
100-
- LATEST_RELEASE
101-
- DEV
99+
item:
100+
- sq_version: LATEST_RELEASE
101+
java_version: 21
102+
- sq_version: LATEST_RELEASE
103+
java_version: 17
104+
- sq_version: DEV
105+
java_version: 21
102106
name: Plugin QA
103107
needs:
104108
- build
@@ -116,8 +120,8 @@ jobs:
116120
- uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
117121
with:
118122
version: 2025.7.12
119-
- name: Select Java 17
120-
run: mise use java@17
123+
- name: Select Java Version
124+
run: mise use java@${{ matrix.item.java_version}}
121125
- name: Configure Maven
122126
uses: SonarSource/ci-github-actions/config-maven@v1
123127
with:
@@ -133,7 +137,7 @@ jobs:
133137
GITHUB_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).GITHUB_TOKEN }}
134138
run: |
135139
cd its/plugin
136-
mvn package --batch-mode -Pit-plugin -Dsonar.runtimeVersion=${{ matrix.sq_version }} -Dmaven.test.redirectTestOutputToFile=false -B -e -V -Dparallel=classes -DuseUnlimitedThreads=true
140+
mvn package --batch-mode -Pit-plugin -Dsonar.runtimeVersion=${{ matrix.item.sq_version }} -Dmaven.test.redirectTestOutputToFile=false -B -e -V -Dparallel=classes -DuseUnlimitedThreads=true
137141
138142
sanity:
139143
name: Sanity Test

its/plugin/projects/spotbugs-external-report/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<plugin>
1515
<groupId>com.github.spotbugs</groupId>
1616
<artifactId>spotbugs-maven-plugin</artifactId>
17-
<version>4.5.3.0</version>
17+
<version>4.9.8.2</version>
1818
<configuration>
1919
<plugins>
2020
<plugin>

its/plugin/tests/src/test/java/com/sonar/it/java/suite/ExternalReportTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public void pmd() {
7474
public void spotbugs() {
7575
MavenBuild build = TestUtils.createMavenBuild().setPom(TestUtils.projectPom("spotbugs-external-report"))
7676
.setProperty("sonar.java.spotbugs.reportPaths", "target" + File.separator + "spotbugsXml.xml")
77-
.setGoals("clean package com.github.spotbugs:spotbugs-maven-plugin:4.5.3.0:spotbugs", "sonar:sonar");
77+
.setGoals("clean package com.github.spotbugs:spotbugs-maven-plugin:spotbugs", "sonar:sonar");
7878
orchestrator.executeBuild(build);
7979

8080
String projectKey = "org.sonarsource.it.projects:spotbugs-external-report";

mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[tools]
2-
java = ["24", "17"]
2+
java = ["24", "21", "17"]
33
maven = "3.9"

0 commit comments

Comments
 (0)