Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify frontend for wsdl2java in a pom.xml?

I found this great tip about adding -fe jaxws21 to the wsdl2java command to have it generate jaxws 2.1 compliant code instead of 2.2, but Maven's pom.xml doesn't seem to like this addition when placed like this:

            <goals>
                <goal>wsdl2java -fe jaxws21</goal>
            </goals>

What is the correct way of specifying a frontend for wsdl2java that's used in a pom.xml?

like image 951
Withheld Avatar asked Dec 31 '12 17:12

Withheld


1 Answers

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

like image 112
tafit3 Avatar answered Oct 30 '22 04:10

tafit3