openrewrite / openrewrite/rewrite-migrate-java
FacesManagedBeansRemoved for Faces 4.0 recipe updates
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 156
- Forks
- 130
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 21
Description
Faces 4.0 recipe - FacesManagedBeansRemoved - needs additions
I found a few things the org.openrewrite.java.migrate.jakarta.FacesManagedBeansRemoved recipe is missing.
Reference documents
- Previous Jakarta Faces 3.0 docs shows replacements needed. Most are currently covered
- Additional docs on migration to Faces 4.0 for EE10: https://docs.redhat.com/en/documentation/red_hat_jboss_enterprise_application_platform/8.0/html/migration_guide/application-migration-from-jakarta-ee-8-to-ee-10_default#faces-managed-beans_default
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:
[ERROR] ... package jakarta.faces.bean does not exist
[ERROR] ... cannot find symbol
[ERROR] symbol: class CustomScoped
Additional analysis: https://github.com/openrewrite/rewrite-migrate-java/pull/1025#issuecomment-4112880851
Problem:
jakarta.faces.bean.CustomScopedwas removed in Faces 4.0 with no direct replacement. The CDI equivalent involves defining a custom scope annotation with@NormalScopeor@Scope, plus registering aContextimplementation — this is NOT a simpleChangeType.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
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:
[ERROR] ... cannot find symbol
[ERROR] symbol: method name()
[ERROR] location: @interface jakarta.faces.annotation.ManagedProperty
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/main/resources/META-INF/rewrite/jakarta-faces-4.yml at the FacesManagedBeansRemoved recipe and review the Faces 3.0/4.0 and Red Hat migration references. Focus on the remaining CustomScoped case; the issue notes that it is not a simple ChangeType and may require a custom Java recipe plus CDI Context work. Done requires an agreed feasible scope and corresponding migration coverage; ManagedProperty is already fixed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100