CXF XJC Maven 插件似乎classpath:
支持.
XsdOption 对象用于为要处理的每个 XSD 文件传递特定选项和配置。
该站点上的示例显示classpath:
在<xsdOption>
路径中以多种方式使用<xsd>
、<bindingFile>
和<catalog>
路径:
<configuration>
<sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
<xsdOptions>
<xsdOption>
<xsd>classpath:/schemas/wsdl/http.xsd</xsd>
<bindingFile>classpath:/schemas/wsdl/http.xjb</bindingFile>
<catalog>${basedir}/src/main/build-resources/catalog.cat</catalog>
</xsdOption>
<xsdOption>
<xsd>classpath:/schemas/wsdl/ws-addr.xsd</xsd>
<packagename>org.apache.cxf.ws.addressing</packagename>
</xsdOption>
<xsdOption>
<xsd>classpath:/schemas/wsdl/addressing.xsd</xsd>
<bindingFile>classpath:/schemas/wsdl/addressing.xjb</bindingFile>
</xsdOption>
<xsdOption>
<xsd>classpath:/schemas/configuration/security.xsd</xsd>
<bindingFile>classpath:/schemas/configuration/security.xjb</bindingFile>
<catalog>${basedir}/src/main/build-resources/catalog.cat</catalog>
<extensionArgs>
<extensionArg>-Xdv</extensionArg>
</extensionArgs>
</xsdOption>
<xsdOption>
<xsd>classpath:/schemas/wsdl/ws-addr-wsdl.xsd</xsd>
<bindingFile>classpath:/schemas/wsdl/ws-addr-wsdl.xjb</bindingFile>
<extension>true</extension>
</xsdOption>
<xsdOption>
<xsd>classpath:/schemas/wsdl/addressing200403.xsd</xsd>
<bindingFile>classpath:/schemas/wsdl/addressing200403.xjb</bindingFile>
</xsdOption>
</xsdOptions>
</configuration>