Trying out the JAXB episodic compilation outlined here:
(
http://weblogs.java.net/blog/kohsuke/archive/2006/09/separate_compil.html).
So far, works great. My setup is the following:
Project A:
JAXB Class A
Project B (depends on Project A):
JAXB Class B, which imports and refers to Class A
Class A only gets in A.jar, and Class B only gets in B.jar. My problem
however, is with certain XJC plugins that require ALL the classes to be
in the model outline, like this one which handles Collection types very
nicely:
http://www.conspicio.dk/blog/bjarne/jaxb-xmlelementwrapper-plugin
Some of my Collection classes are in Class A, but because Class A isn't
in the outline passed into Plugin.run(Outline, Options, ErrorHandler),
it doesn't know about it. It just iterates over outline.getClasses(),
which now doesn't contain Class A classes.
Trying to fix the plugin, but even then I can't find a way to
either (a) iterate over the episodes being used in xjc, and/or (b)
programatically add new CClassInfo objects for the classes in Class A
(like CClassInfo.fromClass(Class c) ?).
Any help is much appreciated,
Scott