在Java 8中,我将codehaus的jaxws-maven-plugin版本2.5用于maven中的wsimport目标。现在,我将应用程序移至Java 11,插件执行产生错误。
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<versionRange>2.5</versionRange>
Run Code Online (Sandbox Code Playgroud)
我找到了一种解决方法,并使用以下方法解决了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>
Run Code Online (Sandbox Code Playgroud)
我相信codehaus尚未更新其插件以提供对Java11的支持。我的方法是正确的,还是有其他选择?