apache / helix

Mirror of Apache Helix
Apache License 2.0
461 stars 224 forks source link

[apache/helix] -- Provide JDK 1.8 (backward) compatibility of helix-core #2775

Closed himanshukandwal closed 5 months ago

himanshukandwal commented 6 months ago

Issues

Description

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.

<major.minor.patch> will use JDK11 (default)
<major.minor.patch> classifier say jdk8 , will use JDK8

For JDK-11 usecase

      <dependency>
          <groupId>org.apache</groupId>
          <artifactId>helix</artifactId>
          <version>1.3.4</version>
      </dependency>

For JDK-8 usecase

      <dependency>
          <groupId>org.apache</groupId>
          <artifactId>helix</artifactId>
          <version>1.3.4</version>
          <classifier>jdk8</classifier>
      </dependency>

Tests

---------------------------------------------------------------------------------------------------
mvn clean install -Dmaven.test.skip.exec=true
---------------------------------------------------------------------------------------------------
[INFO] 
[INFO] --- compiler:3.10.1:compile (JDK 8) @ helix-core ---
[WARNING]  Parameter 'outputDirectory' is read-only, must not be used in configuration
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 579 source files to /Users/hkandwal/Documents/workspaces/projects/helix_os_hk/helix-core/target/classes_jdk8
[INFO] 
[INFO] --- compiler:3.10.1:compile (JDK 11) @ helix-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 579 source files to /Users/hkandwal/Documents/workspaces/projects/helix_os_hk/helix-core/target/classes
[INFO] 
[INFO] --- bundle:5.1.4:manifest (bundle-manifest) @ helix-core ---
[WARNING] Manifest org.apache.helix:helix-core:bundle:1.3.2-SNAPSHOT : Unused Import-Package instructions: [org.apache.logging.log4j*, org.apache.logging.slf4j*] 
[INFO] Writing manifest: /Users/hkandwal/Documents/workspaces/projects/helix_os_hk/helix-core/target/classes/META-INF/MANIFEST.MF
[INFO] 

(If CI test fails due to known issue, please specify the issue and test PR locally. Then copy & paste the result of "mvn test" to here.)

Changes that Break Backward Compatibility (Optional)

(Consider including all behavior changes for public methods or API. Also include these changes in merge description so that other developers are aware of these changes. This allows them to make relevant code changes in feature branches accounting for the new method/API behavior.)

Documentation (Optional)

(Link the GitHub wiki you added)

Commits

Code Quality

himanshukandwal commented 5 months ago

This PR is ready to be merged and has been approved by @zpinto.

Final Commit Message: 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.