问题
I have the WSDL file for a JAX-WS web service. I have created a maven-archetype-quickstart project(simple java project) and imported it to Eclipse Kepler workspace using import->existing maven project. I copied the wsdl file to the project's src/main/resources folder(created resources newly). I generated the web service client using the maven plugin
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>2.7.11</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>ext</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>src/main/resources/test.wsdl</wsdl>
<extraargs>
<extraarg>-impl</extraarg>
<extraarg>-verbose</extraarg>
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
The client files are generated in the ext folder. But I want to generate a JAR file out of the web service client files. I saw that WSDL2Java command has a -clientjar option, but I dont know how to use it with the above plug in. Any help is greatly appreciated. Thanks.
来源:https://stackoverflow.com/questions/23338077/need-to-create-a-jar-out-of-the-web-service-client-files