I’m working on a large project that is using JDK1.5 and it looks as if the xsd’s have generated java files using JAXB 1.0. I’m trying to use JAXB 2.0 to generate new java files where I have modified the xsd’s. I generate the java files but there are compile errors:
“AccessType cannot be resolved” and “The import javax.xml.bind.annotation.AccessType cannot be resolved”
Is it possible to have generated files in the same project using both versions of JAXB?
Just curious. Is there a specific reason for you to maintain generated source from two different versions? Are there existing consumers whose code will break if you upgrade to 2.0? Or are you worried about breaking your existing code's behaviour if you regenerate all the classes?
If not, you could regenerate all the code for 2.0 - its a one-time deal. Of course, if you need to maintain the original code for compatibility reasons, and have the new code coexist, then that is a different matter.