cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: multiple xjc args in extraargs for Maven cxf-codegen-plugin configuration
Date Mon, 07 Dec 2009 17:41:17 GMT

Just a note:  with CXF 2.2.5, see:
https://issues.apache.org/jira/browse/CXF-2445

Thus, you can use:
<xjcargs>
     <xjcarg>-verbose</xjcarg>
     <xjcarg>-b,${basedir}/src/main/wsdl/core-response.episode</xjcarg>
     <xjcarg>-Xname,-Xname-classSubstitution=/$/Dto/</xjcarg>
     <xjcarg>-episode,${project.build.outputDirectory}/train-track-
service.episode</xjcarg>
</xjcargs>

which is then separate from the other stuff in extraargs.    It's up to you.  
:-)

Dan



On Sat December 5 2009 2:35:37 pm stug23 wrote:
> After a bit of trial and error, I was able to apply multiple sets of xjc
>  args in respective extraargs.
> 
> This is handy when you need to specify multiple JAXB plugins and multiple
> episodes for JAXB. Note that I still paired the related args with a
> comma-delimiter in a single extraarg element (e.g.,
> "-xjc-Xname,-Xname-classSubstitution=/$/Dto/")
> 
> I am including the entire Maven cxf-codegen-plugin XML with the extraargs
> configuration here in case this is useful to anyone else.
> 
> -----------------------------------
> <plugin>
>     <groupId>org.apache.cxf</groupId>
>     <artifactId>cxf-codegen-plugin</artifactId>
>     <version>${cxf.version}</version>
>     <dependencies>
>         <dependency>
>             <groupId>org.cassee.xjc-plugins</groupId>
>             <artifactId>xjc-plugins-classname</artifactId>
>             <version>0.3</version>
>         </dependency>
>     </dependencies>
>     <executions>
>         <execution>
>             <id>generate-sources</id>
>             <phase>generate-sources</phase>
>             <configuration>
>                 <verbose>true</verbose>
> 
> <sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
>                 <wsdlOptions>
>                     <wsdlOption>
> 
> <wsdl>${basedir}/src/main/wsdl/TrainTrackService.wsdl</wsdl>
>                         <extraargs>
>                             <extraarg>-xjc-verbose</extraarg>
> 
> <extraarg>-xjc-b,${basedir}/src/main/wsdl/core-response.episode</extraarg>
> 
> <extraarg>-xjc-Xname,-Xname-classSubstitution=/$/Dto/</extraarg>
> 
> <extraarg>-xjc-episode,${project.build.outputDirectory}/train-track-service
> .episode</extraarg> </extraargs>
>                     </wsdlOption>
>                 </wsdlOptions>
>             </configuration>
>             <goals>
>                 <goal>wsdl2java</goal>
>             </goals>
>         </execution>
>     </executions>
> </plugin>
> -----------------------------------
> 

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

Mime
View raw message