2

During the development, I am facing some issues to generate stubs with maven jaxws-maven-plugin. My requirment is given below.

I have some wsdls in my specified location, now my jaxws-maven-plugin will read them from the specified location and will create the stubs files for me. In the In the stubs files wsdlLocation will be the name of the wsdl files exist on the each location and I will specify the location manually.

Secondly, maven will also copy the wsdl files in the location where classes are build. So, latter I can refer to those wsdls locally.

I have written my plugin where I am able to generate the stub classes but wsdl file locations not containing the location I want. Also need help to copy the wsdl files to the location I need.

<plugin>
 <groupId>org.codehaus.mojo</groupId>
 <artifactId>jaxws-maven-plugin</artifactId>
 <executions>
 <execution>
 <goals>
  <goal>wsimport</goal>
 </goals>
 <configuration>
   <wsdlDirectory>${project.build.directory}/wsdl/coh/BCS_COH-CXP9022427-${coh.version}/wsdl</wsdlDirectory>
   <wsdlfiles>  
    <wsdlfile>\Service.wsdl</wsdlfile>
   </wsdlfiles>  
 <wsdlLocation>/*</wsdlLocation>
 <sourceDestDir>src/main/java</sourceDestDir>
 <verbose>true</verbose>
 </configuration>
 </execution>
 </executions>
</plugin>
4

1 に答える 1

2

いくつかのグーグルの後、私は答えを見つけました。最初にorg.codehaus.mojojaxws-maven-pluginを使用していましたが、上記のコードは使用すると機能します

 <groupId>org.jvnet.jax-ws-commons</groupId>
                <artifactId>jaxws-maven-plugin</artifactId>
                <version>2.2.1</version>
于 2013-06-16T18:48:24.340 に答える