Substitute removed Faces managed beans

MSAL

This recipe substitutes Faces Managed Beans, which were deprecated in JavaServer Faces 2.3 and have been removed from Jakarta Faces 4.0.

org.openrewrite.java.migrate.jakarta.FacesManagedBeansRemoved
mod run . --recipe=org.openrewrite.java.migrate.jakarta.FacesManagedBeansRemoved

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Change type javax.faces.bean.ApplicationScoped to jakarta.enterprise.context.ApplicationScoped
  2. Change type jakarta.faces.bean.ApplicationScoped to jakarta.enterprise.context.ApplicationScoped
  3. Change type javax.faces.bean.ManagedProperty to jakarta.faces.annotation.ManagedProperty
  4. Change type jakarta.faces.bean.ManagedProperty to jakarta.faces.annotation.ManagedProperty
  5. Remove annotation attribute @ManagedProperty(name)
  6. Change type NoneScoped to Dependent
  7. Change type NoneScoped to Dependent
  8. Change type javax.faces.bean.RequestScoped to jakarta.enterprise.context.RequestScoped
  9. Change type jakarta.faces.bean.RequestScoped to jakarta.enterprise.context.RequestScoped
  10. Change type javax.faces.bean.SessionScoped to jakarta.enterprise.context.SessionScoped
  11. Change type jakarta.faces.bean.SessionScoped to jakarta.enterprise.context.SessionScoped
  12. Change type javax.faces.bean.ViewScoped to jakarta.faces.view.ViewScoped
  13. Change type jakarta.faces.bean.ViewScoped to jakarta.faces.view.ViewScoped
  14. Update Faces @ManagedBean to use CDI @Named