Skip to content

Commit

Permalink
Use --release 8 during compilation
Browse files Browse the repository at this point in the history
Motivation:

We should use --release 8 during compilation to ensure we always end up
with the correct java version that is required.

Modifications:

- Upgrade compiler plugin so the release flag is only used when
compiling with java9+
- Specify release flag
- Fix source and target version as we already use JDK8 classes in the code.

Result:

Always end up with the correct bytecode
  • Loading branch information
normanmaurer committed Jun 24, 2024
1 parent 9d07886 commit d4ee24f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
<checkstyle.skip>true</checkstyle.skip>
<enforcer.plugin.version>1.4.1</enforcer.plugin.version>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.release>8</maven.compiler.release>
<netty.build.version>31</netty.build.version>
<junit.version>5.9.0</junit.version>
<animal.sniffer.skip>true</animal.sniffer.skip>
Expand Down Expand Up @@ -224,10 +225,11 @@
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.13.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<release>${maven.compiler.release}</release>
</configuration>
</plugin>

Expand Down

0 comments on commit d4ee24f

Please sign in to comment.