20.1.4. 使用Ant(Using Ant)

你可以在你的Ant build脚本中调用SchemaExport:

  1. <target name="schemaexport">
  2. <taskdef name="schemaexport"
  3. classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
  4. classpathref="class.path"/>
  5. <schemaexport
  6. properties="hibernate.properties"
  7. quiet="no"
  8. text="no"
  9. drop="no"
  10. delimiter=";"
  11. output="schema-export.sql">
  12. <fileset dir="src">
  13. <include name="**/*.hbm.xml"/>
  14. </fileset>
  15. </schemaexport>
  16. </target>