How to import other circuit banks using scomp tool

There are a huge number of xml schemes for business, some of them are ordinary types, such as Money.xsd, Address.xsd, etc., while others are business specific, such as Customer.xsd, ShippingOrder.xsd etc. Therefore, I decide to compile these schemes into 2 jars, one is commonbeans.jar, the other is businessbeans.jar.

I divided them into different folders.

to create commonbeans.jar simply, just run "scompoutout commonbeans.jar .... \ common * .xsd";

when you run "scompoutout businessbeans.jar .... \ business * .xsd" is a different story, there are errors that say they cannot find these common types and run "scompoutout businessbeans.jar .... \ business *. xsd .... \ business * .xsd "will blindly duplicate all the regular types in businessbeans.jar.

so is it possible to link commonbeans.jar when compiling these business schemes, maybe something like "scompoutout businessbeans.jar .... \ business * .xsd commonbeans.jar".

I hope my bad english expressed my problem!

+3
source share
1 answer

You need to use an argument -cp.

scomp -cp s1.jar -out s2.jar s2.xsd

See XmlBeansFaq for details .

+3
source

Source: https://habr.com/ru/post/1743466/


All Articles