Has anyone managed to generate java code from a JAXB schema file without XJC?
Somewhat similar to
JavaCompiler javaCompiler = ToolProvider.getSystemJavaCompiler()
used to dynamically compile java code on the fly.
Note: Running on JDK 6, meaning that com.sun.*
tools packages are deprecated (thanks Blaise Doughan for the hint)
Another way of getting the dependencies in Maven;
The following may help:
I had to include some J2EE libraries for my solution to work cause standalone JDK 6 provides no access to xjc utility classes:
*.java sources will be placed in outputDirectory
Get the JAXB reference implementation here.
It includes the com.sun.tools.xjc.api.XJC class that allows you to generate the Java code.
This code generates files at specific Directories/Package structure: