tags:

views:

49

answers:

1

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!

A: 

You need to use the -cp argument.

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

See XmlBeansFaq for more details.

rochb