The code I’m working on is using jaxb2-maven-plugin from org.codehaus.mojo to generate Java classes from XSD schema. I’m looking for a way to automatically implement equals() and hashCode() methods for those classes, but it seems there is not a way. I know that there are other JAXB2 Maven plugins that do that (http://confluence.highsource.org/display/J2B/Home for example), but I was wondering if anyone of you encountered this issue before and if there’s a way for fixing it. I’m generating the classes using the xjc goal.
The code I’m working on is using jaxb2-maven-plugin from org.codehaus.mojo to generate Java classes
Share
JAXB2 Basics you’re mentioning is not a property of
maven-jaxb2-plugin, it is a standalone set of JAXB 2.x plugins you can use with XJC – orjaxb2-maven-pluginor whatever.What I wanted to ask – why not just use
maven-jaxb2-plugin? It has so much more functionality compared to the Codehaus plugin – including configuration support for JAXB2 plugins.