Are you aware of any good JAXB Plugin which generated Builder pattern classes for the generated JAXB classes? Composing domain using JAXB generated classes is really nasty. I s
The following snippet from a pom.xml
file, uses maven cxf-xjc-plugin
to generate the JAXB classes and also leverages jaxb-fluent-api
to tack-on fluent interfaces ... which aren't exactly a complete builder pattern on their own ... but I think they leave room for folks to make decent headway in that direction.
org.apache.cxf
cxf-xjc-plugin
2.7.7
net.java.dev.jaxb2-commons:jaxb-fluent-api:2.1.8
generate-xsd-sources
generate-sources
xsdtojava
${basedir}/target/generated-sources/cxf-xjc/
${basedir}/src/main/wsdl/your.xsd
com.your.package.name
-Xfluent-api