users@jaxb.java.net

Why is schemagen seemingly ignoring most of my classes?

From: KARR, DAVID (ATTSI) <"KARR,>
Date: Tue, 22 Mar 2011 15:41:26 -0700

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.