xjc send different classes to different packages



I am using JAXB to create classes from an xsd schema. Is there a way to tag individual complexTypes so that they are sent to different destination packages rather than have them all sent to the same package?


The reason I need this is that a lot of the resulting java classes will be replaced with other classes of the same names from a different source. It is a pain to manually remove all the unused classes from one destination folder. It would be easier to just put all the unwanted classes in a different folder, which I could then ignore when I import the output into eclipse. When I tried to simply exclude the complexType definitions from the unwanted classes from the xsd file, xjc through errors each time it encountered a property of one of the unwanted types. I need to keep the property references, but I want the eventual java references to those properties to point to classes of the same name that have already been generated by other means.


No comments:

Post a Comment