In Java 8, I was using codehaus' jaxws-maven-plugin version 2.5 for wsimport goal in maven. Now I am moving my application to Java 11 and the plugin execution gives error.
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<versionRange>2.5</versionRange>
I found one workaround and used the following which resolved the error in Java 11 - :
<plugin>
<groupId>com.helger.maven</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
I believe codehaus has not yet updated its plugin to provide support for Java11. Is my approach a right one, or is there any alternative?
The wsimport command generates the following JAX-WS portable artifacts. These artifacts can be packaged in a WAR file with the Web Services Description Language (WSDL) file and schema documents and the endpoint implementation to be deployed. The wsimport command also provides a wsimport Ant task.
The new version of Java 11 does not supply the tools to import and generate WSDL (wsimport and wsgen). Do you have an idea to solve this lack? import javax.jws.... Thanks. I'm not used to looking at into the binaries of Metro JAX-WS. I'm going to test with Java 11 and the JAX-WS maven plugin.
When to use wsimport ? Web service provider provides a WSDL file after publishing a web service. In this situation any client or consumer can run wsimport command by passing wsdl file to generate the required client supported files which will be used to consume the published service
The wsimport command also provides a wsimport Ant task. Java Architecture for XML Binding (JAXB) generated value types (mapped Java classes from schema types) To start the wsgen command, enter the following commands:
I solved the issue by using the following plugin
<groupId>com.helger.maven</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.6</version>
Update : New plugin is available which can be used for this purpose. Apparently com.helger plugin was just a temporary workaround.
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.3.2</version>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With