Migrate Mojarra and Glassfish JSF dependencies to Jakarta Faces#1040
Merged
Migrate Mojarra and Glassfish JSF dependencies to Jakarta Faces#1040
Conversation
…arta Faces The JSF 2.x to Jakarta Faces migration recipes only handled javax.faces:javax.faces-api, missing the widely-used Mojarra (com.sun.faces:jsf-api, com.sun.faces:jsf-impl) and Glassfish (org.glassfish:javax.faces) artifacts. This caused ClassCastException at runtime when upgrading to Spring 6 because the JSF runtime stayed on javax.el while Spring 6 uses jakarta.el. Adds ChangeDependency rules for com.sun.faces and org.glassfish:javax.faces in the Faces 3.x migration, and UpgradeDependencyVersion for org.glassfish:jakarta.faces in the Faces 4.x migration. Fixes moderneinc/customer-requests#2160
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
ChangeDependencyrules forcom.sun.faces:jsf-apiandcom.sun.faces:jsf-impl(Mojarra) to theFaces2xMigrationToJakartaFaces3xrecipe chainChangeDependencyrule fororg.glassfish:javax.facesto the same chainUpgradeDependencyVersionfororg.glassfish:jakarta.facesin the Faces 4.x migrationContext
Customers migrating JSF 2.x applications to Spring 6 encounter a
ClassCastExceptionat runtime:This happens because Spring 6 uses Jakarta EE (
jakarta.el.ELResolver), but the JSF runtime stays onjavax.elwhen using Mojarra (com.sun.faces) or Glassfish (org.glassfish:javax.faces) artifacts — these were not covered by the existingUpdateJakartaFacesApi3recipe which only handledjavax.faces:javax.faces-api.Test plan
UpdateJakartaFacesApiTest.Faces3.migrateSunFacesJsfApi— verifiescom.sun.faces:jsf-api→jakarta.faces:jakarta.faces-api:3.0.xUpdateJakartaFacesApiTest.Faces3.migrateSunFacesJsfImpl— verifiescom.sun.faces:jsf-impl→org.glassfish:jakarta.faces:3.0.xUpdateJakartaFacesApiTest.Faces3.migrateGlassfishJavaxFaces— verifiesorg.glassfish:javax.faces→org.glassfish:jakarta.faces:3.0.xUpdateJakartaFacesApiTest.Faces4.upgradeGlassfishJakartaFaces— verifiesorg.glassfish:jakarta.facesupgrade to4.0.x