I wouldn't want to make a Castor build dependent on having a JAR file of a previous build around. We definitely have a chicken-egg problem here in that we need the source generate (including binding) to be built to run the source generator to create the binding XML classes ... but we need the binding XML classes to build the source generator.
As far as building from Maven ... maybe we want to do this:
1) Build the binding classes using a previous JAR, then
2) Build codegen, then
3) Build the binding classes using the new classes, then
4) Build codegen one more time and make the JAR
Since the binding classes are not used to generate code, the above is inconvenient but necessary and suffiicent, IMHO.
Ideally, we could find a way to build codegen WITHOUT binding and make sure that our binding XML never uses a binding file. Then we could do this in a straightforward way. But it we want codegen to be "current" we currently would need to generate the binding code twice.
As far as I know, we only have this problem with codegen. With the CTF and other components, we will just need to build codgen first, then generate any needed code, then build the rest.