How to specify multiple WSDLs for generating JAX-WS artifacts using CXF’s Maven plugin for wsdl2java (cxf-codegen-plugin)?
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<wsdlOptions>
<!-- for myService1.wsdl -->
<wsdlOption>
<wsdl>${basedir}/src/main/wsdl/myService1.wsdl</wsdl>
</wsdlOption>
<!-- for myService2.wsdl -->
<wsdlOption>
<wsdl>${basedir}/src/main/wsdl/myService2.wsdl</wsdl>
</wsdlOption>
. . .
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
Each element corresponds to a WSDL for which we need to generate artifcats.
About this entry
You’re currently reading “How to specify multiple WSDLs for generating JAX-WS artifacts using CXF’s Maven plugin for wsdl2java (cxf-codegen-plugin)?,” an entry on Singaram's Tech Musings
- Published:
- May 15, 2011 / 3:02 PM
- Category:
- Apache CXF, Web Services
- Tags:
- CXF, cxf-codegen, Maven, plugin, WSDL

3 Comments
Jump to comment form | comment rss [?] | trackback uri [?]