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"
  • Loading branch information
lhotari authored Apr 25, 2021
1 parent 3f03be0 commit e5a2c5f
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ flexible messaging model and an intuitive client API.</description>
</issueManagement>

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

<!--config keys to congiure test selection -->
<include>**/Test*.java,**/*Test.java,**/*Tests.java,**/*TestCase.java</include>
Expand Down Expand Up @@ -1667,13 +1667,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 e5a2c5f

Please sign in to comment.