Issue
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?
Solution
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>
Answered By - Aditya Batra
Answer Checked By - Mary Flores (JavaFixing Volunteer)