2012-05-23 155 views
0

從我讀過的內容來看,我相信XJC參數用於自定義o/p Java文件。我們在jaxws-maven插件中使用了這些。我遇到了一個'MaskingClassLoader'問題,在添加jaxb-xjc jar時未找到問題。爲什麼我的構建在使用jaxws-maven-plugin時失敗?

在jaxws-maven-plugin中,提供的xjc參數之一是'-Xybdisplay',除了'-Xcollection-setter-injector'和'-Xboolean-getter'之外。當我嘗試執行'wsimport'時,出現錯誤

 
[INFO] jaxws:wsimport args: [-s, D:\HeartBeat_Admin\test\testmodel\target\jaxws\wsimport\java, -d, D:\HeartBeat_Admin\test\testmodel\target\classes, -extension, -Xnocompile, -B-verbose, -B-extension, -B-Xcollection-setter-injector, -B-Xboolean-getter, -B-Xybdisplay, D:\HeartBeat_Admin\test\testmodel\src\main\wsdl\test.wsdl] 
Using java.util.ServiceLoader 
[ybdisplay] XJC Plugin class com.sun.tools.xjc.addon.DisplayPlugin instantiated 
[ybdisplay] Parse argument -Xybdisplay 
parsing WSDL... 


[INFO] ------------------------------------------------------------------------ 

[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 18.265s 
[INFO] Finished at: Wed May 23 23:35:11 IST 2012 
[INFO] Final Memory: 63M/63M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.codehaus.mojo:jaxws-maven-plugin:1.12:wsimport (profile) on project testmodel: Error executing: wsimport [-s, D:\HeartBeat_Admin\test\testmodel\target\jaxws\wsimport\java, -d, D:\HeartBeat_Admin\test\testmodel\target\classes, -extension, -Xnocompile, -B-verbose, -B-extension, -B-Xcollection-setter-injector, -B-Xboolean-getter, -B-Xybdisplay, D:\HeartBeat_Admin\test\testmodel\src\main\wsdl\test.wsdl] -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 

-e和-X沒有什麼幫助。我試圖在xsd中搜索術語'ybdisplay',但我無法理解問題是什麼或定製如何工作。刪除xjc參數'ybdisplay'會導致一個錯誤,指出我需要啓用它以進行自定義。

在XSD,我們有以下

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
     xmlns:ybmeta="http://www.yellowbook.com/bp/model/meta" 
     xmlns:tns="http://www.yellowbook.com/bp/model/types" 
     xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" 
     xmlns:jxb="http://java.sun.com/xml/ns/jaxb" 
     targetNamespace="http://www.yellowbook.com/bp/model/types" 
     elementFormDefault="unqualified" 
     attributeFormDefault="unqualified" jxb:version="2.0" jxb:extensionBindingPrefixes="ybmeta xjc"> 

<!-- Use our specific bindings --> 
<xsd:annotation> 
    <xsd:appinfo> 
     <jxb:bindings schemaLocation="test.xsd"> 
      <jxb:schemaBindings> 
       <jxb:package name="com.test.model.api"/> 
      </jxb:schemaBindings> 
     </jxb:bindings> 
    </xsd:appinfo> 
</xsd:annotation> 

我不知道,如果以上是有關XJC參數「ybdisplay」。請引導我關於xjc的工作以及如何調試此問題。

回答

0

這對XJC args沒有任何關係。如果它幫助任何人,這個問題是由於內存不足造成的。我修改了MAVEN_OPT中的堆大小,並且一切正常。

相關問題