Skip to content

Commit 55a0db2

Browse files
committed
Use javac --release instead of -source & -target
`--release` also verifies that only API from that Java version is used. Otherwise when building with a JDK newer than the target version it would be possible to accidentally use API not available in the target version.
1 parent 4835217 commit 55a0db2

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
@@ -131,8 +131,7 @@
131131
<groupId>org.apache.maven.plugins</groupId>
132132
<artifactId>maven-compiler-plugin</artifactId>
133133
<configuration>
134-
<source>${java.target}</source>
135-
<target>${java.target}</target>
134+
<release>${java.target}</release>
136135
<compilerArgument>-Xlint:deprecation</compilerArgument>
137136
</configuration>
138137
</plugin>

0 commit comments

Comments
 (0)