如果xsd
是最新的,则xjc
不会生成该类。
我希望总是生成类..
<target name="jaxbSource" description="Generate jaxb objects">
<echo message="Generate jaxb objects for CategoryAPIRequest..." />
<xjc source="2.0" schema="${basedir}/schemas/categoryAPI/CategoryAPIRequest.xsd" package="com.myrio.tm.company.categories.util.request"
destdir="${basedir}/src" binding="${basedir}/schemas/categoryAPI/binding.xml">
<produces dir="${basedir}/src" includes="**/*.java" />
<arg value="-extension" />
</xjc>
<echo message="Generate jaxb objects for CategoryAPIReturn..." />
<xjc source="2.0" schema="${basedir}/schemas/categoryAPI/CategoryAPIReturn.xsd" package="com.myrio.tm.company.categories.util.response"
destdir="${basedir}/src" binding="${basedir}/schemas/categoryAPI/binding.xml">
<produces dir="${basedir}/src" includes="**/*.java" />
<arg value="-extension" />
</xjc>
</target>
- My Binding xml是:
<?xml version="1.0" encoding="UTF-8"?>
<jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" jaxb:version="2.1">
<jaxb:globalBindings>
<xjc:serializable/>
</jaxb:globalBindings>
</jaxb:bindings>