Hi !
I am trying to generate a Java class containing the methods toString, equals
and hashCode from an XSD file with the cxf-xjc-plugin version 2.6.1. I got
toString working, but I am not able to figure out how to get the CXF plugin to
generate the equals and the hashCode methods. My plugin configuration looks
like :
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-xjc-plugin</artifactId>
<version>${cxf.xjc.plugin.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>xsdtojava</goal>
</goals>
<configuration>
<sourceRoot>${basedir}/target/generated-sources</sourceRoot>
<xsdOptions>
<xsdOption>
<extension>true</extension>
<xsd>${basedir}/src/main/resources/xsd/Message.xsd</xsd>
<extensionArgs>
<arg>-Xts:style:multiline</arg>
<!--<arg>-Xequals</arg>-->
<!--<arg>-XhashCode</arg>-->
</extensionArgs>
</xsdOption>
</xsdOptions>
<extensions>
<extension>org.apache.cxf.xjcplugins:cxf-xjc-ts:${cxf.xjc.plugin.version}</extension>
<!--<extension>org.apache.cxf.xjcplugins:cxf-xjc-Xequals:${cxf.xjc.plugin.version}</extension>-->
<!--<extension>org.apache.cxf.xjcplugins:cxf-xjc-XhashCode:${cxf.xjc.plugin.version}</extension>-->
</extensions>
</configuration>
</execution>
</executions>
</plugin>
Do you know how I can configure the CXF plugin to generate the equals and
hashCode methods ? Thanks in advance for any help,
-- Morten