I currently create a database using a SQL script and Ant's <sql> task. Is it possible to use Hibernate's <schemaexport> task to create a database (not just its tables)? Here's the sample code I found (works to create tables):
Code:
<target name="schemaexport">
<taskdef name="schemaexport"
classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="classpath"/>
<schemaexport
properties="${classes.dir}\hibernate.properties"
quiet="no"
text="no"
drop="no"
delimiter=";"
output="{table.dir}/out.sql">
<fileset dir="src">
<include name="**/*.hbm.xml"/>
</fileset>
</schemaexport>
</target>