This is an automated email from the ASF dual-hosted git repository.

eolivelli pushed a commit to branch 2.7.2_ds_rootless
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 1a94bbcdc7b197f1167652e894de093ab7cf7be2
Author: Lari Hotari <lhot...@users.noreply.github.com>
AuthorDate: Mon Apr 26 00:56:56 2021 +0300

    [Build] Specify release in maven-compiler-plugin configuration on JDK11 
(#10343)
    
    * Specify release in maven-compiler-plugin configuration
    
    * Use "8" instead of "1.8"
    
    (cherry picked from commit e5a2c5f272808163fd8c588e3e4badc6b5e70ca3)
---
 pom.xml | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 258fabb..1cec75a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -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/>
@@ -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>

Reply via email to