Faces 4.0 recipe - FacesManagedBeansRemoved - needs additions
I found a few things the org.openrewrite.java.migrate.jakarta.FacesManagedBeansRemoved recipe is missing.
Reference documents
Missing fixes
1. CustomScoped
java.faces.bean.CustomScoped and jakarta.faces.bean.CustomScoped seem to need a custom recipe to use CDI custom scopes and jakarta.enterprise.context.spi.Context. Unsure of recipe scope, and if feasible.
Migration case with build error:
[ERROR] ... package jakarta.faces.bean does not exist
[ERROR] ... cannot find symbol
[ERROR] symbol: class CustomScoped
Problem: jakarta.faces.bean.CustomScoped was removed in Faces 4.0 with no direct replacement. The CDI equivalent involves defining a custom scope annotation with @NormalScope or @Scope, plus registering a Context implementation — this is NOT a simple ChangeType.
Status: This would require a custom Java recipe and the migration path isn't mechanical (the issue author also notes "unsure of recipe scope, and if feasible"). Skipping for now.
✅ 2. ManagedProperty name - fixed in #1025/#1027
Faces 3.0 ManagedProperty doc
Faces 4.0 ManagedProperty doc
name was an optional element in Faces 3.0, and removed in Faces 4.0. Possibly remove entirely unless there is another migration path to maintain functionality.
Migration case with build error:
[ERROR] ... cannot find symbol
[ERROR] symbol: method name()
[ERROR] location: @interface jakarta.faces.annotation.ManagedProperty
Faces 4.0 recipe -
FacesManagedBeansRemoved- needs additionsI found a few things the org.openrewrite.java.migrate.jakarta.FacesManagedBeansRemoved recipe is missing.
Reference documents
Missing fixes
1. CustomScoped
java.faces.bean.CustomScopedandjakarta.faces.bean.CustomScopedseem to need a custom recipe to use CDI custom scopes andjakarta.enterprise.context.spi.Context. Unsure of recipe scope, and if feasible.Migration case with build error:
Additional analysis: #1025 (comment)
✅ 2.
ManagedProperty name- fixed in #1025/#1027Faces 3.0 ManagedProperty doc
Faces 4.0 ManagedProperty doc
namewas an optional element in Faces 3.0, and removed in Faces 4.0. Possibly remove entirely unless there is another migration path to maintain functionality.Migration case with build error: