dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
852 stars 467 forks source link

Update CLI to use Highest version possible between 3.5.x -> 3.6.x to support J21+J11 #28744

Closed spbolton closed 2 months ago

spbolton commented 4 months ago

Task: Upgrade Quarkus Version for Compatibility with Java 21

Objective: Upgrade Quarkus to at least version 3.5, with a target to upgrade to the latest 3.6.x version, ensuring compatibility with Java 21 and maintaining functionality with Java 11 as long as possible.

Background

To support Java 21, Quarkus must be upgraded to at least version 3.5. However, Quarkus 3.7 and higher do not support Java 11. Therefore, the plan is to upgrade to the highest possible Quarkus version compatible with Java 11 before transitioning to Java 21.

Initial tests with Quarkus 3.5 have identified necessary changes, particularly migrating javax imports to jakarta equivalents. Further upgrades to the latest 3.6.x version should be explored, given minimal additional changes are required.

Steps

  1. Merge Changes from Test Branch

  2. Ensure Correct GraalVM Version

    • Verify and update the build to use the appropriate GraalVM version compatible with the targeted Quarkus version.
  3. Upgrade Quarkus to Latest 3.6.x Version

    • Utilize the Quarkus CLI to assist in upgrading the codebase to subsequent Quarkus versions.
    • Address any conflicts arising from global Openrewrite settings that may interfere with the CLI upgrade process.
  4. Update Import References

    • Update all javax imports to their jakarta equivalents as required by the new Quarkus versions.
  5. Testing and Validation

    • Thoroughly test the upgraded application running on both Java 11 and Java 21.
    • Ensure that the application builds and runs correctly with the updated Quarkus version.
    • Validate that all functionalities are intact and no regressions are introduced.

Checklist

Additional Notes

spbolton commented 3 months ago

Internal QA Tested update compile/build with both java 11 and Java 21. Tested Native build works on my mac m1 with both Java 11 GraalVM and Java 21 GraalVM. Java 21 Graalvm can be used even when the rest of the build is Java 11. (Native build on apple silicon may require an updated parameter depending on the matchine "--native-compiler-options=-Wno-nullability-completeness" this is added in quarkus.native.additional-build-args. and has been added by default in https://github.com/dotCMS/core/pull/29111 )

We have only updated to 3.5 here and not 3.6. We do not need to upgrade to 3.6 at this time and can follow up with this. This upgrade should be an easier process without code changes.

bryanboza commented 2 months ago

Fixed, this still working in Java 11 without problems, smoke testing with java 21 and so far everything is ok. Full compatibility will be tested later.