Skip to content

Commit 10d2cf3

Browse files
committed
maven: switch to maven.compiler.release
Build with --release instead of -source and -target, to ensure we use the correct language rules and system classes. Fixes build warning on Java > 22: Warning: location of system modules is not set in conjunction with -source 22 not setting the location of system modules may lead to class files that cannot run on JDK 22 --release 22 is recommended instead of -source 22 -target 22 because it sets the location of system modules automatically Signed-off-by: Benjamin Gilbert <[email protected]>
1 parent 82cb182 commit 10d2cf3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525

2626
<properties>
2727
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
28-
<maven.compiler.source>22</maven.compiler.source>
29-
<maven.compiler.target>22</maven.compiler.target>
28+
<maven.compiler.release>22</maven.compiler.release>
3029
</properties>
3130

3231
<build>

0 commit comments

Comments
 (0)