Tools for converting hbm.xml to entity annotations?

Hello!
I’m working on a large (~300 tables) Hibernate upgrade project. We’re converting all of these hmb.xml to entity based annotations and doing it manually is taking… A long time.

Are there any existing projects out there that can do this conversion? If not, can someone give me some tips to validate my ideas for doing this? I’ve come up with 3 possible approaches

  • Use initialized Hibernate context to read metadata from HBM and use it to modify entity clases. The more existing code I can reuse the better.
  • Use an existing project or code for reading hbm to generate entity classes
  • Write my own hbm parser and Entity class modification code. This is my hail-mary approach, I would rather reuse existing Hibernate code.

Any pointers/ideas for how to do this easily?

I never tried it out myself, but there is a Tool called Windup which can be used for migration: GitHub - windup/windup: Windup - Application Migration and Assessment Tool