java - Wsimport 在 Java 11 中失败
问题描述
在 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>
我找到了一种解决方法并使用以下解决了 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 的支持。我的方法是正确的,还是有其他选择?
解决方案
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>
推荐阅读
- node.js - 如何使用 Nodejs 将文件的内容读入控制台
- eclipse - 插件 org.eclipse.jdt.ui 无法加载类 org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart。Kotlin 插件在 Eclipse 中不起作用
- c# - 如何使用反射从方法中获取字段的名称?
- javascript - ASP.NET MVC 向 JS 发送类对象的问题 - JS 数组中的空对象
- reactjs - 我想从此数组中获取值,但我无法准确选择它
- html - 如何将无序列表拆分为特定点的列?
- vue.js - 如何在 vuepress 或 vuejs 中显示数组中的图像?
- f# - 如何在 F# 中创建一个可以加密字节数组的 xor 函数?
- docker - COPY 命令是否创建中间容器?
- actions-on-google - 意图填充槽 - Google Actions Builder