Le 03/04/2026 à 13:43, Romain Manni-Bucau a écrit :

Have to admit it is not clear for me why since in any case the models differ and JAXB supports everything in both cases.

For JAXB, if the namespace are not the same, then they are not mapped to the same Java objects. We get two set of Java classes, one for each version. This is reasonable if the two versions have little in common. If, on the contrary, the two versions are very similar (which is our case for the POM), this is a lot of duplication. Assuming that the Java code is designed for the latest version, we have to copy all data from the old objects to the new objects, which is tedious. Alternatively we can create interfaces implemented by both set of classes, but this is tedious as well. Finally we can use XSLT for converting the old schema to the new one on the fly at JAXB unmarshalling time. All those solutions work but are more difficult than keeping the same namespace with only new objects added and no change in the objects that existed in the previous version.

    Martin



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to