jaxws-maven-plugin无法运行wsimport(ErrorListener) [英] jaxws-maven-plugin fail to run wsimport (ErrorListener)

查看:214
本文介绍了jaxws-maven-plugin无法运行wsimport(ErrorListener)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自昨天以来,我在这个问题上陷入困境. 我在Windows上使用Maven 2:

I am stuck since yesterday on this problem. I am using maven 2 on Windows:

Apache Maven 2.2.1 (r801777; 2009-08-06 20:16:01+0100)

在pom中,我使用插件jaxws-maven-plugin这样:

And in my pom I use the plugin jaxws-maven-plugin as this :

<plugin>
    <groupId>org.jvnet.jax-ws-commons</groupId>
    <artifactId>jaxws-maven-plugin</artifactId>
    <version>2.2</version>
    <executions>
        <execution>
            <goals>
                <goal>wsimport</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <wsdlFiles>
            <wsdlFile>${basedir}/src/main/resources/MyService.wsdl
            </wsdlFile>
        </wsdlFiles>
        <packageName>my.package.name</packageName>
    </configuration>
</plugin>

当我运行mvn compile时,出现以下错误:

When I run mvn compile I get the following error :

[INFO] jaxws:wsimport args: [-keep, -s, D:\myService\target\generated-sources\wsimport, -Xnocompile, -p, my.service.name, file:/D:/myService/src/main/resources/MyService.wsdl]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error executing: wsimport [-keep, -s, D:\myService\target\generated-sources\wsimport, -Xnocompile, -p, my.service.name, file:/D:/myService/src/main/resources/MyService.wsdl]

Embedded error: com/sun/tools/xjc/api/ErrorListener
com.sun.tools.xjc.api.ErrorListener

我尝试过:

  • 添加值为"-Xmx768M -Xms768M -XX:PermSize = 256m"的Windows env变量MAVEN_OPT
  • 我自己启动wsimport,并且正在运行:

  • Adding a Windows env variable MAVEN_OPT with value "-Xmx768M -Xms768M -XX:PermSize=256m"
  • To launch wsimport myself, and it is working :

wsimport -keep -s D:\myService\target\generated-sources\wsimport -Xnocompile -p my.service.name file:/D:/myService/src/main/resources/MyService.wsdl

所以任何人都知道这可能意味着什么:

So anyone knows what could mean:

嵌入式错误:com/sun/tools/xjc/api/ErrorListener

com.sun.tools.xjc.api.ErrorListener

推荐答案

为maven添加详细日志记录对我有所帮助:mvn -X编译 我实际上有一个:

Adding verbose logging for maven helped me : mvn -X compile I had in fact a :

Caused by: java.lang.NoClassDefFoundError: com/sun/tools/xjc/api/ErrorListener
        at java.lang.ClassLoader.defineClass1(Native Method)

这是因为我的依赖项之一不在Classpath中.

It is because one of my dependency is not in the Classpath.

这篇关于jaxws-maven-plugin无法运行wsimport(ErrorListener)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆