You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by jx...@apache.org on 2024/03/26 18:17:05 UTC

(helix) branch master updated: [apache/helix] -- Enable JDK-8 Build alsong with JDK-11 (#2775)

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

jxue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git


The following commit(s) were added to refs/heads/master by this push:
     new 224997721 [apache/helix] -- Enable JDK-8 Build alsong with JDK-11 (#2775)
224997721 is described below

commit 224997721d6a9975bee2be16eeb7594899c03623
Author: Himanshu Kandwal <hi...@gmail.com>
AuthorDate: Tue Mar 26 11:17:00 2024 -0700

    [apache/helix] -- Enable JDK-8 Build alsong with JDK-11 (#2775)
    
    We would like to provide a backward compatible support to our consumers where they also have an option to use JDK-8 compiled helix-core jar, if they have such a requirement. By default we will generate JDK-11 jars and JDK-8 jars using a classifier.
---
 helix-core/pom.xml | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/helix-core/pom.xml b/helix-core/pom.xml
index d3934f579..ba3d7b7e5 100644
--- a/helix-core/pom.xml
+++ b/helix-core/pom.xml
@@ -179,14 +179,52 @@
       </resource>
     </resources>
     <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>3.12.1</version>
+        <executions>
+          <execution>
+            <id>JDK 8</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>compile</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${project.build.outputDirectory}_jdk8</outputDirectory>
+              <release>8</release>
+              <fork>true</fork>
+            </configuration>
+          </execution>
+          <execution>
+            <id>JDK 11</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>compile</goal>
+            </goals>
+            <configuration>
+              <release>11</release>
+              <fork>true</fork>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
+        <version>3.3.0</version>
         <executions>
           <execution>
+            <id>default-package-jdk11</id>
+            <phase>package</phase>
             <goals>
+              <goal>jar</goal>
               <goal>test-jar</goal>
             </goals>
+            <configuration>
+              <classesDirectory>${project.build.outputDirectory}_jdk8</classesDirectory>
+              <classifier>jdk8</classifier>
+            </configuration>
           </execution>
         </executions>
       </plugin>