Multiple executions would work if the id of the executions are each unique.  
Like "generate-sources-wsdl1", "generate-sources-wsdl2", .etcc...


However, you would get better performance by having a single execution.   The 
wsdlOptions element can have several wsdlOption children, each configuring a 
different wsdl.   They would all get executed.

Dan

On Thursday 01 April 2010 10:32:51 am M.Ismail wrote:
> Hi,
> 
> I've got multiple WSDLs and I don't know how to make maven generate code
> for all of them at once using wsdl2java plugin (cxf-codegen-plugin). I've
> tried adding another <execution> but it didn't work:
> 
> <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>./target/generated/cxf</sourceRoot>
>                                                       <wsdlOptions>
>                                                               <wsdlOption>
>                                                                       
<wsdl>./src/main/resources/wsdl/HelloWorld.wsdl</wsdl>
>                                                                       
> <extraargs>
>                                                                               
> <extraarg>-
verbose</extraarg>
>                                                                               
> <extraarg>-
p</extraarg>
>                                                                               
<extraarg>org.apache.cxf.schemas.cxf.soap.helloworld</extraarg>
>                                                                       
> </extraargs>
>                                                                       
<OutputDir>./target/generated/cxf</OutputDir>
>                                                               </wsdlOption>
>                                                       </wsdlOptions>
>                                               </configuration>
>                                               <goals>
>                                                       <goal>wsdl2java</goal>
>                                               </goals>
>                                       </execution>
>                                       <execution>
>                                               <id>generate-sources</id>
>                                               <phase>generate-sources</phase>
>                                               <configuration>
>                                                       
<sourceRoot>./target/generated/cxf</sourceRoot>
>                                                       <wsdlOptions>
>                                                               <wsdlOption>
>                                                                       
<wsdl>./src/main/resources/wsdl/greetings.wsdl</wsdl>
>                                                                       
> <extraargs>
>                                                                               
> <extraarg>-
verbose</extraarg>
>                                                                               
> <extraarg>-
p</extraarg>
>                                                                               
<extraarg>org.apache.cxf.schemas.cxf.soap.greetings</extraarg>
>                                                                       
> </extraargs>
>                                                                       
<OutputDir>./target/generated/cxf</OutputDir>
>                                                               </wsdlOption>
>                                                       </wsdlOptions>
>                                               </configuration>
>                                               <goals>
>                                                       <goal>wsdl2java</goal>
>                                               </goals>
>                                       </execution>
>                               </executions>
>                       </plugin>
> thanks

-- 
Daniel Kulp
dk...@apache.org
http://dankulp.com/blog

Reply via email to