Skip to content

Commit 1b02e55

Browse files
SONARJAVA-5968 Build with Java 25 (#5390)
Co-authored-by: Dorian Burihabwa <75226315+dorian-burihabwa-sonarsource@users.noreply.github.com>
1 parent 0a12393 commit 1b02e55

6 files changed

Lines changed: 9 additions & 16 deletions

File tree

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,8 @@ To run tests locally follow these instructions.
5555

5656
### Java versions
5757

58-
You need `Java 24` to build the project and `Java 17` run the Integration Tests (ITs).
59-
* `Java 17` can be used to build and test all modules except under `java-checks-test-sources` that requires `Java 24`.
60-
* `Java 24` can be used to build and test all modules except under `its` that requires `Java 17` because of SQ incompatibility.
58+
You need `Java 25` to compile and run the Unit Tests of the project and `Java 17` run the Integration Tests (ITs).
59+
Note that `Java 21` can be used to build and test all modules except under `java-checks-test-sources` (as they require `Java 25`) and `its` (as they require `Java 17` because of SQ incompatibility).
6160

6261
### Build the Project and Run Unit Tests
6362

@@ -164,7 +163,7 @@ Make sure that the `java-checks-test-sources` module has been compiled (ie: the
164163

165164
In doubt, go the [`java-checks-test-sources`](java-checks-tests-sources) module and run:
166165
```shell
167-
# Use java 24!
166+
# Use java 25!
168167
mvn clean compile
169168
```
170169

@@ -194,7 +193,7 @@ You can debug ITs by adding `-Dmaven.binary=mvnDebug` as an option when running
194193

195194
### License
196195

197-
Copyright 2012-2025 SonarSource.
196+
Copyright 2012-2026 SonarSource.
198197

199198
SonarQube analyzers released after November 29, 2024, including patch fixes for prior versions, are published under the [Sonar Source-Available License Version 1 (SSALv1)](LICENSE.txt).
200199

its/autoscan/src/test/java/org/sonar/java/it/AutoScanTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public void javaCheckTestSources() throws Exception {
125125
.setSourceEncoding("UTF-8")
126126
.setSourceDirs("aws/src/main/java/,default/src/main/java/,java-17/src/main/java/,spring-3.2/src/main/java/,spring-web-4.0/src/main/java/")
127127
.setTestDirs("default/src/test/java/,java-17/src/test/java/,test-classpath-reader/src/test/java")
128-
.setProperty("sonar.java.source", "24")
128+
.setProperty("sonar.java.source", "25")
129129
// common properties
130130
.setProperty("sonar.cpd.exclusions", "**/*")
131131
.setProperty("sonar.skipPackageDesign", "true")

java-checks-test-sources/default/pom.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,9 +1041,7 @@
10411041
<compilerArgs>
10421042
<arg>-Xlint:-deprecation</arg>
10431043
</compilerArgs>
1044-
<release>24</release>
1045-
<source>24</source>
1046-
<target>24</target>
1044+
<release>25</release>
10471045
<annotationProcessorPaths>
10481046
<path>
10491047
<groupId>org.projectlombok</groupId>

java-checks-test-sources/spring-3.2/pom.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@
8787
<groupId>org.apache.maven.plugins</groupId>
8888
<artifactId>maven-compiler-plugin</artifactId>
8989
<configuration>
90-
<release>24</release>
91-
<source>24</source>
92-
<target>24</target>
90+
<release>25</release>
9391
</configuration>
9492
</plugin>
9593
<plugin>

java-checks-test-sources/spring-web-4.0/pom.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@
4343
<groupId>org.apache.maven.plugins</groupId>
4444
<artifactId>maven-compiler-plugin</artifactId>
4545
<configuration>
46-
<release>22</release>
47-
<source>22</source>
48-
<target>22</target>
46+
<release>25</release>
4947
</configuration>
5048
</plugin>
5149
<plugin>

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", "21", "17"]
2+
java = ["25", "21", "17"]
33
maven = "3.9"

0 commit comments

Comments
 (0)