Xsd JAXB:防止重新生成类

Xsd JAXB:防止重新生成类,xsd,jaxb,Xsd,Jaxb,我很难让课程再生。我是 我有一个模式a,它被导入到模式B中。然后模式B被导入到模式C中 在模式A中,我有两个SimpleType,它们是字符串的枚举: <xs:simpleType name="blah_type"> <xs:restriction base="xs:string"> <xs:enumeration value="blah_1"/> <xs:enumeration value="blah_2"/>

我很难让课程再生。我是

我有一个模式a,它被导入到模式B中。然后模式B被导入到模式C中

在模式A中,我有两个SimpleType,它们是字符串的枚举:

<xs:simpleType name="blah_type">
<xs:restriction base="xs:string">
        <xs:enumeration value="blah_1"/>
        <xs:enumeration value="blah_2"/>
        <xs:enumeration value="blah_3"/>
        <xs:enumeration value="blah_4"/>
        <xs:enumeration value="blah_5"/>
    </xs:restriction>
</xs:simpleType>


<xs:simpleType name="another_blah_type">
    <xs:restriction base="xs:string">
        <xs:enumeration value="another_blah_1"/>
        <xs:enumeration value="another_blah_2"/>
        <xs:enumeration value="another_blah_3"/>
        <xs:enumeration value="another_blah_4"/>
        <xs:enumeration value="another_blah_5"/>
    </xs:restriction>
</xs:simpleType>

论文生成生成的类。在模式C中,与这些枚举相对应的类不断被重新生成,当然是在错误的位置。我以这种方式添加对现有类的引用:()


我还有其他类型(complexTypes和非枚举simpleTypes),这些类型的一切都很好


感谢您的帮助。

您可以使用插曲文件进行模块化架构编译:


我正在为我需要的东西寻找解决办法。我只是想明确指出,java枚举不在.eption文件中,并且仍然会重新生成。我注意到这个问题只发生在这些枚举上。我知道,这篇文章已经很老了,但是我找不到一个解决方案来保存枚举的生成。你找到什么了吗?我的问题现在得到了回答——这是方法,它是如何工作的。
<jaxb:bindings  node="//xs:simpleType[@name='blah_type']">
    <jaxb:class ref="com.stuff.otherstuff.really.deep.BlahType"/>
</jaxb:bindings>