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

[Build] Specify release in maven-compiler-plugin configuration on JDK11 #10343

Merged
merged 2 commits into from
Apr 25, 2021
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
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