The pom.xml depends on "old" maven modules. In maven 3.0 the code has been changed a lot. The jaxws-maven-plugin uses the maven plugin to construct the classpath for wsgen.
Proposal move to the latest maven project versions, e.g. use:
<dependencies>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-tools</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>3.0-alpha-2</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.0.2</version>
</dependency>
</dependencies>
This also solves the following problem:
- module with jaxws-maven-plugin using wsgen builds correctly when build standalone
- the same module as part of a large module hierarchy fails to build. The wsgen classpath contains jars on the classpath of unrelated modules. The resolving of these modules is caused by the code in maven-project.
Tested: using above dependencies the build problem is solved and wsgen is executed with the correct classpath.
Probably worth underlining that this plugin in incompatible with Maven 3, for the above reason. Here is the error message...
[ERROR] Failed to execute goal org.codehaus.mojo:jaxws-maven-plugin:1.12:wsimport (default) on project elmi-client: Execution default of goal org.codehaus.mojo:jaxws-maven-plugin:1.12:wsimport failed: Plugin org.codehaus.mojo:jaxws-maven-plugin:1.12 or one of its dependencies could not be resolved: Failed to collect dependencies for org.codehaus.mojo:jaxws-maven-plugin:jar:1.12 (): Failed to read artifact descriptor for com.sun.xml.ws:jaxws-tools:jar:2.1.7: Could not transfer artifact com.sun.xml.ws:jaxws-tools:pom:2.1.7 from maven1-repository.java.net (http://download.java.net/maven/1/):
No connector available to access repository maven1-repository.java.net (http://download.java.net/maven/1/
) of type legacy using the available factories WagonRepositoryConnectorFactory -> [Help 1]