【发布时间】:2021-02-11 14:48:34
【问题描述】:
我正在开发一个项目并尝试从编译器版本迁移。从 JDK 1.7 到 1.8。在构建过程中,我在其中一个模块上收到了以下错误,但我无法解决。
Failed to execute goal org.codehaus.mojo:jaxws-maven-plugin:2.6:wsimport (default) on project wae-client-jar: Invocation of com.sun.tools.ws.wscompile.WsimportTool failed - check output
我使用的是IntelliJ,而我的Maven 版本是3.6.3。
这是我的 pom.xml 的相关部分:
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
<configuration>
<wsdlDirectory>src/main/wsdl</wsdlDirectory>
<packageName>com.company.wae.client.ebif.eps.sopi.wsdl</packageName>
</configuration>
<dependencies>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.2.10</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>com.company.wae.base</groupId>
<artifactId>wae-jboss-lib</artifactId>
<version>9.8.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
到目前为止,我已经尝试过了,
-更新插件配置如下
<configuration>
<wsdlDirectory>src/main/wsdl</wsdlDirectory>
<packageName>com.company.wae.client.ebif.eps.sopi.wsdl</packageName>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
</configuration>
- 将 jaxws-maven-plugin 的版本更改为 2.4.1 并在 dep 下面添加。到插件
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-tools</artifactId>
<version>2.2.10</version>
</dependency>
-不仅构建该模块,还构建整个项目。
-从本地 repo m2 中删除 jaxws-maven-plugin 和 jaxws-tools 文件夹。
-检查 JAVA_HOME 路径以查看是否指向 JDK1.8。检查项目SDK(JDK 1.8)
主要提到here。
这些都没有帮助。
【问题讨论】:
标签: java maven jaxws-maven-plugin