Skip to content

SLCORE-2226, SLCORE-2227 Migrate to Java 21#1917

Open
damien-urruty-sonarsource wants to merge 2 commits intomasterfrom
task/dam/SLCORE-2226-sloop-distribution-java-21
Open

SLCORE-2226, SLCORE-2227 Migrate to Java 21#1917
damien-urruty-sonarsource wants to merge 2 commits intomasterfrom
task/dam/SLCORE-2226-sloop-distribution-java-21

Conversation

@damien-urruty-sonarsource
Copy link
Contributor

No description provided.

@hashicorp-vault-sonar-prod
Copy link

hashicorp-vault-sonar-prod bot commented Mar 17, 2026

SLCORE-2226
SLCORE-2227

@damien-urruty-sonarsource damien-urruty-sonarsource force-pushed the task/dam/SLCORE-2226-sloop-distribution-java-21 branch 7 times, most recently from 218cba5 to 6f6bb8f Compare March 17, 2026 16:08
@damien-urruty-sonarsource damien-urruty-sonarsource force-pushed the task/dam/SLCORE-2226-sloop-distribution-java-21 branch from 6f6bb8f to 04404e1 Compare March 17, 2026 16:26
@sonarqube-next
Copy link

@damien-urruty-sonarsource damien-urruty-sonarsource marked this pull request as ready for review March 17, 2026 16:52
@sonar-review-alpha
Copy link

sonar-review-alpha bot commented Mar 17, 2026

Summary

Migrates SonarLint backend and CLI to Java 21 while preserving Java 11 compatibility for the client SDK. The change introduces separate parent POMs for backend and client modules, allowing backend to target Java 21 (taking advantage of newer dependencies that now require it) while keeping the client on Java 11 for OSGi/Eclipse compatibility. The Sloop CLI distribution bundle is updated to JDK 21, and CI/CD workflows are streamlined with a cleaner approach to orchestrator Java version handling.

What reviewers should know

Start by reviewing the parent POM changes: pom.xml now sets maven.compiler.release to 21, and new backend/pom.xml and client/pom.xml establish the module hierarchy. Note that client/pom.xml explicitly overrides to Java 11 with a clarifying comment. Then check the backend/* modules to verify their parent references changed from sonarlint-core-parent to sonarlint-backend-parent. The CLI changes are in backend/cli/pom.xml where JRE downloads were bumped from 17 to 21 (verify the new sha256 hashes). Finally, review .github/workflows/build.yml - the matrix no longer has a generic java property; only SQLts99 now needs Java 17 via customOrchestratorJavaVersion for compatibility testing, which the workflow sets as ORCHESTRATOR_JAVA_HOME instead of the default.


  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

Copy link

@sonar-review-alpha sonar-review-alpha bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conclusion: Clean, well-executed migration. The parent-POM split into sonarlint-backend-parent (Java 21) and sonarlint-client-parent (Java 11) is the right structural move and the compiler overrides are consistently applied. JRE hashes for the same binaries (windows_x64, linux_x64) are identical between backend/cli/pom.xml and medium-tests/pom.xml, which is reassuring. The ORCHESTRATOR_JAVA_HOME approach in CI correctly keeps the build on Java 21 while giving Orchestrator a Java 17 home only for the SQLts99 matrix entry.

🗣️ Give feedback

Copy link
Contributor

@eray-felek-sonarsource eray-felek-sonarsource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Let's merge this after we make sure all the consumer IDEs are green

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants