I had a schemagen task that was working at some point in the recent
past. I just tried it today and it appears to be only generating types
and elements from a single class in the package I told it to look in. I
need it to only operate on a single package in my source tree, but I
want it to process all the classes in that package.
What I currently have is this:
<target name="gen-schema" depends="init">
<taskdef name="schemagen" classpathref="build.classpath"
classname="com.sun.tools.jxc.SchemaGenTask"/>
<schemagen srcdir="src/main/java"
destdir="${main.classes.dir}">
<include name="**/domain/*.java"/>
<schema namespace="
http://mynamespace" file="MySchema.xsd"/>
</schemagen>
</target>
I have perhaps 20 Java source files in that package, but it's only
creating types from a single one of those classes. I'm not sure what
the distinguishing factor is about that one class, except for the fact
that it's a base class of some of the other classes in the package.
Every class has an "@XmlType" annotation on the class.