[英]“Invocation of com.sun.tools.ws.wscompile.WsimportTool failed” Error During Compilation With JDK 1.8
[英]Invocation of com.sun.tools.ws.wscompile.WsimportTool failed
在 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
相關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>
它早些時候工作,但突然停止工作。 從我的角度來看,沒有進行任何更改。
爪哇 1.7
網豆 8.1
這是運行eclipse的java版本的問題。 在某些情況下,它是一個例外。 只需在 eclipse.ini 中添加或更改 -vm 參數即可。 對我來說,它適用於 1.8.0_66。
只需放入 eclipse.ini 文件行:
-vm C:\Java\JDK\bin\javaw.exe
如果你在“程序文件”目錄下有java,記得把它寫成非空間約定,如Progra~1及以上-vmarg
檢查環境變量中的 java 版本,無論您是否設置了相同的版本,我遇到了同樣的問題,我在系統變量中設置了 1.8,我正在嘗試使用 1.7 構建
與java版本無關,需要將jaxws-maven-plugin,jaxb-impl版本升級到2.2.`0以上。 如果您仍然面臨同樣的問題,請使用新的存儲庫構建您的項目(有時,可能無法采用現有的存儲庫)。在我的情況下,它可以工作。
我正在使用 IntelliJ IDE。 我將 Java 版本更改為 Open JDK 14。此 JDK 版本也在系統的 JAVA_HOME 中設置。 閱讀有關此問題后,似乎 Java 版本是問題所在。 所以我在 IntelliJ IDE 中更改了 SDK,但這不起作用。 問題只有在更改 JAVA_HOME 並指向 JDK 8 版本后才解決。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.