Wsimport 在 Java 11 中失败

Wsimport failing in Java 11

在 Java 8 中,我在 maven 中使用 codehaus 的 jaxws-maven-plugin 2.5 版作为 wsimport 目标。现在我将我的应用程序移动到 Java 11 并且插件执行出错。

<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<versionRange>2.5</versionRange>

我找到了一种解决方法并使用了以下解决方法 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>

我相信 codehaus 尚未更新其插件以提供对 Java11 的支持。我的方法是正确的,还是有其他选择?

我使用以下插件解决了这个问题

<groupId>com.helger.maven</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
    <version>2.6</version>

更新:可用于此目的的新插件可用。显然 com.helger 插件只是一个临时的解决方法。

<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
    <version>2.3.2</version>

我最近迁移到了 OpenJdk 12 and I also got some problem generating java code from a WSDL. I solved the issue by using the reference implementation of JAX-WS. This is mentioned in the following source JEP 320: Remove the Java EE and CORBA Modules(@Naman 也在此线程中链接了它)。

我使用 maven 神器解决了这个问题 com.sun.xml.ws:jaxws-ri