I 've been search the web high and low and I still can't find how to change code that is using the old SchemaGen ANT task to something that works with JDK 8 where the class is not longer included.
E.g.I have a Maven build that is using the ANT task that fails with:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (generate-schemas) on project MyProject: An Ant BuildException has occured: taskdef A class needed by class com.sun.tools.jxc.SchemaGenTask cannot be found: com/sun/mirror/apt/AnnotationProcessorFactory
[ERROR] using the classloader ...snip...
[ERROR] around Ant part ...<taskdef classname="com.sun.tools.jxc.SchemaGenTask" name="schemagen" classpathref="maven.compile.classpath"/>... @ 6:113 in /Users/scott/dev/Path_to_my_project/target/antrun/build-main.xml: com.sun.mirror.apt.AnnotationProcessorFactory
This has been marked deprecated for a while, with vague references to using javac annotation processing, but never any actual information about how to convert such code.
The JDK 8 docs still link to it in fact.
The link to the ANT task there fails.. But I found this (remove the '.dev') :
Which basically instructs you to do what doesn't work.
given that JAXB is included in the JDK. According to the above URL, "...the JAXB RI in JDK is package renamed to avoid any conflict with the stand-alone JAXB RI distribution..." Which leads me to think this may be a simple matter of figuring out what the correct package is for the SchemaGenTask. Perhaps I'm picking up some external to the JDK copy and the internal AnnotationProcessor bits it is expecting are not in the expected package.