[英]Invocation of com.sun.tools.ws.wscompile.WsimportTool failed
I am getting following exception while hitting wsconsume in maven build:在 maven 构建中点击 wsconsume 时出现以下异常:
Some problems were encountered while building the effective model for MyProject:jar:1.0-SNAPSHOT 'build.plugins.plugin.version' for org.codehaus.mojo:jaxws-maven-plugin is missing. @ line 40, column 14
Failed to execute goal org.codehaus.mojo:jaxws-maven-plugin:2.4.1:wsimport (MyAPI) on project MyProject:Invocation of com.sun.tools.ws.wscompile.WsimportTool failed
RELATED POM:相关POM:
<execution>
<id>MyAPI</id>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<bindingDirectory>${basedir}/src/main/resources</bindingDirectory>
<sourceDestDir>${basedir}/src/main/java</sourceDestDir>
<bindingFiles>
<bindingFile>myprod.jaxb</bindingFile>
</bindingFiles>
<xadditionalHeaders>true</xadditionalHeaders>
<verbose>true</verbose>
<args>
<arg>-Xnocompile</arg>
</args>
<wsdlUrls>
<wsdlUrl>http://my.us:61168/MyProxy.svc?wsdl</wsdlUrl>
</wsdlUrls>
</configuration>
</execution>
It was working earlier but suddenly it stopped working.它早些时候工作,但突然停止工作。 No changes are done from my end.从我的角度来看,没有进行任何更改。
Java 1.7爪哇 1.7
Netbeans 8.1网豆 8.1
This is a problem of java version that runs eclipse.这是运行eclipse的java版本的问题。 In some cases it makes an exception.在某些情况下,它是一个例外。 Just add or change -vm argument in eclipse.ini.只需在 eclipse.ini 中添加或更改 -vm 参数即可。 For me it works for 1.8.0_66.对我来说,它适用于 1.8.0_66。
Just put in eclipse.ini file line:只需放入 eclipse.ini 文件行:
-vm C:\Java\JDK\bin\javaw.exe
If you have java in " program files " directory, remeber to write it in non space convention like Progra~1 and above -vmarg如果你在“程序文件”目录下有java,记得把它写成非空间约定,如Progra~1及以上-vmarg
检查环境变量中的 java 版本,无论您是否设置了相同的版本,我遇到了同样的问题,我在系统变量中设置了 1.8,我正在尝试使用 1.7 构建
it is not related to java version, we need to upgrade the versions of jaxws-maven-plugin,jaxb-impl to 2.2.`0 or more.与java版本无关,需要将jaxws-maven-plugin,jaxb-impl版本升级到2.2.`0以上。 if you still face the same issue please build your project with fresh repository(sometimes,it may faile to take the existed repository).in my case it works.如果您仍然面临同样的问题,请使用新的存储库构建您的项目(有时,可能无法采用现有的存储库)。在我的情况下,它可以工作。
I was using IntelliJ IDE.我正在使用 IntelliJ IDE。 I changed Java version to Open JDK 14. This JDK version was also set in the JAVA_HOME for the system.我将 Java 版本更改为 Open JDK 14。此 JDK 版本也在系统的 JAVA_HOME 中设置。 After reading about this problem it seems Java version was the problem.阅读有关此问题后,似乎 Java 版本是问题所在。 So i changed SDK within IntelliJ IDE, but that didn;t work.所以我在 IntelliJ IDE 中更改了 SDK,但这不起作用。 The problem resolved only after changing JAVA_HOME and pointed to JDK 8 version.问题只有在更改 JAVA_HOME 并指向 JDK 8 版本后才解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.