使用 scomp 工具时如何导入其他 schema jar
业务有大量的 xml 模式,其中一些是常见类型,如 Money.xsd、Address.xsd 等,而其他则是业务特定的,如 Customer.xsd、ShippingOrder.xsd 等。所以我决定编译这些模式分为2个jar,一个是commonbeans.jar,另一个是businessbeans.jar。
我把它们分成不同的文件夹。
构建 commonbeans.jar 很简单,只需运行“scomp -out commonbeans.jar ....\common*.xsd”;
而运行“scomp -outbusinessbeans.jar ....\business*.xsd”是一个不同的故事,有错误说找不到那些常见类型,并运行“scomp -outbusinessbeans.jar ....\ business*.xsd ....\business*.xsd" 会盲目地将所有常见类型复制到businessbeans.jar 中。
那么在编译这些业务模式时有什么方法可以链接 commonbeans.jar ,也许类似于“scomp -outbusinessbeans.jar ....\business*.xsd commonbeans.jar”。
我希望我糟糕的英语表达了我的问题!
there is a huge amount of xml schemas for the business, some of them are common types like Money.xsd, Address.xsd, etc, while others are business specific like Customer.xsd, ShippingOrder.xsd, etc. So I decide to compile these schemas into 2 jars, one is commonbeans.jar, the other is businessbeans.jar.
I've separated them into different folders.
to build the commonbeans.jar is simple, just run "scomp -out commonbeans.jar ....\common*.xsd";
while run "scomp -out businessbeans.jar ....\business*.xsd" is a different story, there are errors say can't find those common types, and run "scomp -out businessbeans.jar ....\business*.xsd ....\business*.xsd" will blindly duplicate all the common types into the businessbeans.jar.
so is there any way to link the commonbeans.jar when compile those busimess schemas, maybe something like "scomp -out businessbeans.jar ....\business*.xsd commonbeans.jar".
I hope my poor english has expressed my issue!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要使用
-cp
参数。有关更多详细信息,请参阅 XmlBeansFaq。
You need to use the
-cp
argument.See XmlBeansFaq for more details.