How to specify frontend for wsdl2java in a pom.xml?
If you are using cxf-codegen-plugin, you can add the arguments in extraargs element:
<executions>
<execution>
<configuration>
<wsdlOptions>
<wsdlOption>
<wsdl>...</wsdl>
<extraargs>
<extraarg>-fe</extraarg>
<extraarg>jaxws21</extraarg>
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
Source: http://cxf.apache.org/docs/maven-cxf-codegen-plugin-wsdl-to-java.html
You can use <frontEnd>
inside <wsdlOption>
or <defaultOption>
. The latter is helpful, if you include multiple WSDLs and specified <wsdlRoot>
:
<executions>
<execution>
<configuration>
<defaultOptions>
<frontEnd>jaxws21</frontEnd>
</defaultOptions>
<wsdlRoot>${basedir}/src/main/wsdl</wsdlRoot>
<includes>
<include>*.wsdl</include>
</includes>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>