On May 30, 2013, at 12:55 PM, zmelnick <[email protected]> wrote:

> Hi!
> 
> I'm trying to get cxf's codegen plugin to build wsdls from a root wsdl
> directory. This works great! However, I'd like the client code to reference
> a relative classpath rather than an absolute one.
> 
> It appears that this can be done when using something like
> <wsdlLocation>classpath:wsdl/foo.wsdl</wsdlLocation>. However, using the
> classpath reference in wsdlRoot does not seem to work.
> 
> This is my configuration:
> 
> <configuration>
>    <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
>    <wsdlRoot>classpath:wsdl/</wsdlRoot>
>    <includes>
>     <include>**/*.wsdl</include>
>    </includes>
> </configuration>
> 
> 
> Replacing ${basedir}/src/main/resources in the wsdlRoot works fine, as does
> just removing that field. Is there a way to get a relative path when using
> the wsdlRoot options?

Not at this time, no.   Good suggestion though. 

If you add a file next to each wsdl called:
foo.wsdl-options

that would have a single line like 
-wsdlLocation classpath:wsdl/foo.wsdl

you could get "close", but that's still a bit of extra work.


-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to