I am getting following exception while hitting wsconsume in maven build:
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:
<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
Netbeans 8.1
This is a problem of java version that runs eclipse. In some cases it makes an exception. Just add or change -vm argument in eclipse.ini. For me it works for 1.8.0_66.
Just put in eclipse.ini file line:
-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 版本,无论您是否设置了相同的版本,我遇到了同样的问题,我在系统变量中设置了 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. 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. I changed Java version to Open JDK 14. This JDK version was also set in the JAVA_HOME for the system. After reading about this problem it seems Java version was the problem. So i changed SDK within IntelliJ IDE, but that didn;t work. The problem resolved only after changing JAVA_HOME and pointed to JDK 8 version.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.