Skip to content

Exclude jcache dependency - #55422

Open
vmuzikar wants to merge 2 commits into
keycloak:mainfrom
vmuzikar:exclude-unused-dependencies
Open

vmuzikar wants to merge 2 commits into
keycloak:mainfrom
vmuzikar:exclude-unused-dependencies

Conversation

@vmuzikar

Copy link
Copy Markdown
Contributor

Closes #55421

Closes keycloak#55421

Signed-off-by: Václav Muzikář <vmuzikar@ibm.com>
@vmuzikar
vmuzikar requested review from a team as code owners November 20, 2026 15:39
Copilot AI balanced review requested due to automatic review settings November 20, 2026 15:39
@vmuzikar

Copy link
Copy Markdown
Contributor Author

@ahus1 Can you please give this a look? This is closely related to your previous PR #55302, and would help removing some unproductized deps.

@vmuzikar
vmuzikar requested a review from ahus1 November 20, 2026 15:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for the JCache dependency removal and accompanying upgrade guidance.

No open issues 🎉

What changed in this PR

Removes unused JCache dependencies from the Quarkus runtime now that Hibernate’s second-level cache is disabled, addressing #55421.

Changes:

  • Excludes Hibernate JCache and Caffeine JCache from the Hibernate ORM dependency.
  • Updates upgrade guidance with the dependencies and configuration needed by custom extensions that require Hibernate caching.
File Description
quarkus/​runtime/​pom.xml Excludes the two JCache dependencies.
docs/​documentation/​upgrading/​topics/​changes/​changes-27_0_0.adoc Documents removed libraries and steps to restore caching for custom extensions.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The integration-test module cannot compile because SingleNamedPuTestProvider lacks the referenced CacheEnabled and CacheDisabled variants and their persistence descriptors.

No open issues 🎉

Review effort: Balanced

Signed-off-by: Václav Muzikář <vmuzikar@ibm.com>
@vmuzikar
vmuzikar force-pushed the exclude-unused-dependencies branch from d715056 to 7e20c32 Compare November 23, 2026 14:47
@vmuzikar
vmuzikar requested a balanced review from Copilot November 23, 2026 15:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block approval of the JCache dependency cleanup and caching-default changes.

No open issues 🎉

Review effort: Balanced

Comment on lines +747 to +751
If you use a custom extension that relies on Hibernate's second-level or query cache, install `org.hibernate.orm:hibernate-jcache`, `com.github.ben-manes.caffeine:jcache`, `javax.cache:cache-api` and `com.typesafe:config` in the `providers` directory, using versions compatible with the bundled Hibernate ORM and Quarkus versions.
Do not duplicate dependencies already bundled with {project_name}, such as Hibernate ORM core and Caffeine core.
To re-enable caching by default, set `quarkus.hibernate-orm.second-level-caching-enabled=true` in `conf/quarkus.properties`.
Custom persistence units inherit this setting unless they explicitly set `hibernate.cache.use_second_level_cache` or `hibernate.cache.use_query_cache` in their `persistence.xml` properties.
Then run `kc.sh build`.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I would even consider completely remove the migration steps and just say second-level cache is not supported any more, if we decide to make it a breaking change and target 27 only. But I'm open to discussion.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This doesn't sound like a viable alternative, this is difficult to get right. I'd say remove it from 27.0 as a breaking change.

Did you plan to backport that change to 26.8?

@vmuzikar

Copy link
Copy Markdown
Contributor Author

@ahus1 This should be ready for review.

@vmuzikar
vmuzikar marked this pull request as ready for review November 23, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exclude jcache dependency

3 participants