It would be very handy if these could be resolved as classpath:
resources like in spring.

2012/3/17 Marcel Stör <[email protected]>:
> In the past I've been using the codegen Maven plugin like this:
>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-codegen-plugin</artifactId>
> <version>${cxf-plugin.version}</version>
> <executions>
>  <execution>
>    <id>generate-soap-client</id>
>    <configuration>
>      <wsdlOptions>
>        <wsdlOption>
>          <wsdl>${basedir}/src/main/wsdl/my.wsdl</wsdl>
>
> Obviously this required the WDSL file to be present in the module.
>
> Now I was looking into referencing the WSDL from a JAR dependency. Example 5
> in the manual[1] shows that this can be achieved given that there's a Maven
> artifact with just the WSDL in it.
> In my case, however, the WSDL is stored as a regular resource in a JAR file
> that contains other artifacts. So, it's my.jar!/my.wsdl in Java JAR
> notation.
>
> Looking at WsdlArtifact.java[2] I saw no option which would allow me to
> achieve what I want.
>
> It tried
>
> <wsdlOptions>
>  <wsdlOption>
>    <wsdl>${settings.localRepository}/path-to-my.jar!/my.wsdl</wsdl>
>  </wsdlOption>
> </wsdlOptions>
>
> which failed. I've never written a Maven plugin but from looking at
> AbstractCodegenMoho.java[3] I'm now convinced that it can't be done.
>
> Is this correct?
>
> Cheers,
> Marcel
>
>
> [1] http://cxf.apache.org/docs/maven-cxf-codegen-plugin-wsdl-to-java.html
> [2]
> http://svn.apache.org/repos/asf/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlArtifact.java
> [3]
> http://svn.apache.org/repos/asf/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
>
> --
> Marcel Stör, http://www.frightanic.com
> Couchsurfing: http://www.couchsurfing.com/people/marcelstoer
> O< ascii ribbon campaign - stop html mail - www.asciiribbon.org



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Reply via email to