It is useful to reference the SchemaExportTask in order to make a
create-tables.sql script. Something like....
<target name="createtables" description="creates database tables">
<taskdef
name="schemaexport"
classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask"
classpath="${classpath};${class.dir};${lib.dir}/hibernate2.jar;${lib.di
r}/dom4j-1.4.jar;${lib.dir}/commons-logging.jar;${lib.dir}/commons-
collections-2.1.jar;${lib.dir}/jtds-0.7.1.jar;${lib.dir}/odmg-3.0.jar">
</taskdef>
<schemaexport quiet="no" text="no" drop="no" delimiter=";"
properties="${class.dir}/hibernate.properties"
output="create-tables.sql">
<fileset dir="${class.dir}" includes="**/*.hbm.xml"/>
</schemaexport>
</target> |