2011/2/25 Daniel Kulp <[email protected]>
>
> Since running wsdl2java can be pretty slow, it only runs if it detects that
> the wsdl it is targetting has changed since the code was generated.
> However, the wsdlOption element in the config for the maven plugin does
> have a
> dependencies list where you can list additional things to check. Example:
>
> <dependencies>
> <dependency>
>
> ${basedir}/target/generated/src/main/resources/wsdl/type_test/types.xd
> </dependency>
> </dependencies>
>
> That may work for you. I'm not really sure though.
>
Hi Daniel, I tried but it did not work. Eventually I "fixed" it deleting all
generated resources and running the compile twice. Here are the relevant
parts from the pom.xml
<!-- Configure compile plugin to run twice -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
<executions>
<execution>
<id>default-compile</id>
</execution>
<execution>
<id>build-generated-wsdl-client-sources</id>
<!-- the phase right after "process-classes" where
client sources have been generated
see: maven lifecycle
-->
<phase>generate-test-sources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<filesets>
<fileset>
<directory>src/main/generated/</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
Now the pom part to generate the wsdl and the client classes for one service
is 130 lines long...I hate maven! :|
Thanks, bye
Lorenzo