20.1.8. 使用Ant进行schema校验

你可以在Ant脚本中调用SchemaValidator:

  1. <target name="schemavalidate">
  2. <taskdef name="schemavalidator"
  3. classname="org.hibernate.tool.hbm2ddl.SchemaValidatorTask"
  4. classpathref="class.path"/>
  5. <schemavalidator
  6. properties="hibernate.properties">
  7. <fileset dir="src">
  8. <include name="**/*.hbm.xml"/>
  9. </fileset>
  10. </schemaupdate>
  11. </target>