Is there any maven plugin for JAXB 3.0 (Jakarta EE 9)?

Viewed 2235

Current maven plugins like jaxb2-maven-plugin and maven-jaxb2-plugin generate code using the package javax.xml instead of the new jakarta.xml package of Jakarta EE. It seems there's no way of configure any of them to use JAXB 3.0. Is there any maven plugin for JAXB 3.0?

2 Answers

jaxb2-maven-plugin version 3.0.0 will support JAXB 3. It doesn't seem to be available yet on Maven repositories, but you can get it on github and install it locally.

Remark: the previous versions almost work (you just need to change their dependencies versions), but unfortunately AbstractJaxbMojo preloads some JAXB classes by name and these names changed.

Related