Using the JXC schema generation ant task, I can't seem to get it to ignore an enum. I have several enums that are used internally to denote type or minor configuration values that are not relevant to the generated XML.
I can exclude the field using the enum as @XmlTransient to exclude it from the object's schema, but a simpleType descriptor is still generated for the enum!
Example:
public class CustomerType {
@XmlTransient
public enum IsolationLevel { ALL, SAME_TYPE, SELECTED }
@XmlTransient
private Long id;
@XmlValue
private String name;
@XmlTransient
private IsolationLevel isolation = IsolationLevel.ALL;
}
Generated Schema:
<xs:simpleType name="isolationLevel">
<xs:restriction base="xs:string">
<xs:enumeration value="ALL"/>
<xs:enumeration value="SAME_TYPE"/>
<xs:enumeration value="SELECTED"/>
</xs:restriction>
</xs:simpleType>
Anyone have any ideas on how to make JXC ignore the enum? It's not being used by any XML mapped property or field, and the enum itself is marked @XmlTransient - why is it still part of my schema?