Make the DOM4J dependency optional in hibernate-core



  • Don't use DOM4J-based XML mapping at all *by default* (currently the default is DOM4J and JAXB is opt-in)

  • Exclude the DOM4J dependency from tests by default

  • Test opt-in DOM4J-based XML mapping through a separate CI job

Note we will have to keep the DOM4J dependency in envers for now. But we should be able to get rid of it in the core.




Yoann Rodière
April 16, 2021, 12:09 PM

Actually, thinking about it... It's much easier to do directly in Hibernate ORM 5.5, and since it's a new minor we can afford that kind of risky implementation change.

Originally the plan was to introduce JAXB-based XML mapping in 5.4, where it would have been too risky to change the default. But in 5.5, I think it's a legitimate move.

So, closing this: I will work on in Hibernate ORM 5.5 instead.

Won't Do


Yoann Rodière


Yoann Rodière