jaxws-maven-plugin on java 5
I’ve just spent another 2 hours trying to get the jaxb-maven-plugin to work on my build machine. I’ve noticed this problem several times in the past too - javb-maven-plugin is not happy when you move between JVMs. Unfortunately to identify the problem I had to modify and re-build the plgin to get it to show an exception. At least it’s open source and maven makes it trivial to do this though…
To use the plugin in java 1.5, you need to specify a jaxws dependency:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.11-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
<configuration>
<packageName>com.mypackage</packageName>
<wsdlDirectory>src/main/resources/</wsdlDirectory>
<wsdlFiles>
<wsdlFile>MyService.wsdl</wsdlFile>
</wsdlFiles>
<verbose>false</verbose>
<target>2.0</target>
</configuration>
<dependencies>
<dependency>
<groupId>javax.jws</groupId>
<artifactId>jsr181-api</artifactId>
<version>1.0-MR1</version>
</dependency>
</dependencies>
</plugin>
Thanks to this forum thread for giving the final clues