Repository navigation
MYFACES-4784: Quarkus 4 / CDI 5.0 / Java 21 - #1144
Merged
Merged
Conversation
3 tasks
Contributor
Author
|
Merge #1145 first and then rebase this one |
melloware
marked this pull request as draft
November 22, 2026 14:09
Member
|
EE12 is Java21+ |
- Migrate the Quarkus extension to Quarkus 4.0.0 - Compile against CDI 5.0.0 (jakarta.cdi:jakarta.cdi-api / jakarta.cdi-el-api) - DefaultELResolverBuilder: obtain the CDI ELResolver via ELAwareBeanManager, since BeanManager#getELResolver() was removed in CDI 5.0 - Require Java 21 across the build and CI Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
melloware
force-pushed
the
MYFACES-4784-quarkus-4
branch
from
November 26, 2026 11:56
23587d4 to
1a4a550
Compare
Contributor
Author
|
All builds are now on JDK 21: GitHub CI, CodeQL, Jenkins matrix and deploy, and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MYFACES-4784
Original Issue: quarkiverse/quarkus-primefaces#546
Faces 5.0 targets Jakarta EE 12. This PR:
DefaultELResolverBuilder, which calledBeanManager.getELResolver(). CDI 5.0 removed that method.1.
BeanManager.getELResolver()was removed in CDI 5.0Quarkus 4 depends on CDI 5.0.0 (
jakarta.cdi:jakarta.cdi-api). In CDI 5.0,BeanManagerno longer has any EL methods. EL integration is now only in the separatejakarta.cdi:jakarta.cdi-el-apiartifact, throughjakarta.enterprise.inject.spi.el.ELAwareBeanManager. The package name hasn't changed since 4.1.DefaultELResolverBuilder.getCDIELResolver()had a latent bug. It checkedinstanceof ELAwareBeanManagerbut then calledbeanManager.getELResolver()on the plainBeanManagertype anyway, and called it again unconditionally on the last line. Against the CDI 5 API that does not compile, and on a CDI 5 runtime it would throwNoSuchMethodError.New behaviour (
impl/src/main/java/org/apache/myfaces/el/DefaultELResolverBuilder.java):ELAwareBeanManageris on the classpath and the bean manager implements it, the method casts to it and callsgetELResolver()(pattern-matchinginstanceof).getELResolver()reflectively. This covers older CDI containers whoseBeanManagerstill has the deprecated method.IllegalStateExceptionwith a clear message instead of aNoSuchMethodError.Quarkus impact:
QuarkusELResolverBuilderalready overridesgetCDIELResolver()with its ownQuarkusCdiELResolver, so this code path isn't used on Quarkus. The only change there is a javadoc{@link}that pointed at the removed method.Points for review
ExternalSpecifications.isCDI41Available()check. Removing them would makejakarta.cdi-el-apia hard runtime requirement for the CDI resolver.2. CDI API 5.0.0
The CDI API's Maven coordinates moved. The old
jakarta.enterprise:jakarta.enterprise.cdi-api:5.0.0is only a relocation pom.jakarta.enterprise:jakarta.enterprise.cdi-api:4.1.0jakarta.cdi:jakarta.cdi-api:5.0.0jakarta.enterprise:jakarta.enterprise.cdi-el-api:4.1.0jakarta.cdi:jakarta.cdi-el-api:5.0.0Updated in
parent/pom.xml(dependencyManagement),api,impl,bundle, andintegration-tests. Because MyFaces now compiles against the EE12 API, any remaining use of a removed CDI method would fail the build. Apart fromgetELResolver()there were none.Not changed:
benchmark/pom.xmlkeeps CDI 4.1.0. It runs on Weld 6, which implements CDI 4.1, and it isn't part of the reactor. Only its Java release was raised to 21.3. Quarkus 3.27.1 → 4.0.0
extensions/quarkus/pom.xmlquarkus.version3.27.1 → 4.0.0extensions/quarkus/showcase/pom.xmlquarkus-junit5→quarkus-junit(renamed in Quarkus 4)extensions/quarkus/showcase/pom.xmljunit-jupiter-apito 6.1.3. The parent pom pins 5.13.4, and that direct dependencyManagement entry wins over the imported Quarkus BOM, which caused a JUnit 5/6 mismatch (NoClassDefFoundError) when surefire started.extensions/quarkus/showcase/pom.xmlextensions/quarkus/showcase/pom.xmlquarkus-maven-plugingets<extensions>true</extensions>, as in Quarkus 4 app projectsextensions/quarkus/showcase/pom.xmlquarkus.package.type=native→quarkus.native.enabled=trueshowcase/.../application.propertiesquarkus.log.file.enable→quarkus.log.file.enabled. Quarkus 4 ignores the old name and logs a warning.I checked the runtime and deployment modules against the other Quarkus 4 breaking changes, and none apply:
QuarkusUnitTest→QuarkusExtensionTest: not used.JsonRPCProvidersBuildItempackage move: not used.META-INF/native-image/*-config.json: none shipped.NativeImageResourceBuildItemonly uses literal paths.query*reflection flags andlambdaCapturingTypes: not used.4. Java 21
pom.xml,parent/pom.xml,integration-tests/pom.xml:java.version17 → 21.benchmark/pom.xml:maven.compiler.release17 → 21.extensions/quarkus/showcase/pom.xml:java.version17 → 21.README.md: minimum requirement "Java 17+" → "Java 21+"..github/workflows/myfaces-ci.yml: JDK 17 → 21..github/workflows/codeql-analysis.yml: JDK 17 → 21.Jenkinsfile:jdk_17_latest→jdk_21_latest(build matrix and deploy stage).Testing
Run locally with Temurin 25, compiling for release 21:
mvn clean install, all reactor modulesimpltests@QuarkusTest) on Quarkus 4.0.0@Disabled, HtmlUnit websocket)integration-tests(test-compile)-Dnative, mandrel container build)🤖 Generated with Claude Code