Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RATIS-2121. Set javac --release when compiling with JDK 9+ #1119

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
<shell-executable>bash</shell-executable>

<!-- define the Java language version used by the compiler -->
<javac.version>1.8</javac.version>
<javac.version>8</javac.version>
<java.min.version>${javac.version}</java.min.version>
<maven.min.version>3.3.9</maven.min.version>

Expand Down Expand Up @@ -522,6 +522,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<rules>
<requireMavenVersion>
Expand Down Expand Up @@ -574,8 +575,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${javac.version}</source>
<target>${javac.version}</target>
<fork>true</fork>
<meminitial>512m</meminitial>
<maxmem>2048m</maxmem>
Expand Down Expand Up @@ -874,6 +873,25 @@
</build>

<profiles>
<profile>
<id>java8</id>
<activation>
<jdk>[,8]</jdk>
</activation>
<properties>
<maven.compiler.source>${javac.version}</maven.compiler.source>
<maven.compiler.target>${javac.version}</maven.compiler.target>
</properties>
</profile>
<profile>
<id>java9-or-later</id>
<activation>
<jdk>[9,]</jdk>
</activation>
<properties>
<maven.compiler.release>${javac.version}</maven.compiler.release> <!-- supported since Java 9 -->
</properties>
</profile>
<profile>
<id>experiments-build</id>
<activation>
Expand Down
Loading