Skip to content

Commit

Permalink
[Build] Specify release in maven-compiler-plugin configuration on JDK…
Browse files Browse the repository at this point in the history
…11 (apache#10343)

* Specify release in maven-compiler-plugin configuration

* Use "8" instead of "1.8"

(cherry picked from commit e5a2c5f)
  • Loading branch information
lhotari authored and eolivelli committed May 14, 2021
1 parent c96e31f commit 1a94bbc
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ flexible messaging model and an intuitive client API.</description>
</issueManagement>

<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>

<!--config keys to congiure test selection -->
<include>*</include>
<exclude/>
Expand Down Expand Up @@ -1505,13 +1508,30 @@ flexible messaging model and an intuitive client API.</description>

<profiles>
<profile>
<id>jdk11-tests</id>
<id>jdk11</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<properties>
<!-- prevents silent NoSuchMethodErrors that happen at runtime on Java 8 -->
<!-- see https://github.com/apache/pulsar/issues/8445 -->
<maven.compiler.release>${maven.compiler.target}</maven.compiler.release>
<!-- required for running tests on JDK11+ -->
<test.additional.args> --add-opens java.base/jdk.internal.loader=ALL-UNNAMED </test.additional.args>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- for some reason, setting maven.compiler.release property alone doesn't work -->
<release>${maven.compiler.release}</release>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>coverage</id>
Expand Down

0 comments on commit 1a94bbc

Please sign in to comment.