So, back to the originial question. I got it working with Hibernate Tools This is what I was using to make it work. Please anyone feel free to comment on this config.
In ant I have the following:
Code:
<!-- HIBERNATE REQUIRED -->
<property name="hibernate.connection.username" value="${database.userid}" />
<property name="hibernate.connection.url" value="${database.url}" />
<property name="hibernate.dialect" value="${database.dialect}" />
<property name="connection.password" value="${database.password}" />
<property name="hibernate.connection.driver_class" value="${database.driver}" />
<taskdef name="htools" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="libraries"/>
<target name="hbm2java" description="Generate .java from .hbm.xml files." depends="copy-resources">
<htools destdir="${generated-java}">
<configuration configurationfile="${webinf}/classes/hibernate.cfg.xml"/>
<hbm2java jdk5="true"/>
<hbm2dao destdir="${generated-java}"/>
</htools>
</target>
<target name="hbm2ddl" depends="copy-resources">
<htools destdir="${generated-schema}">
<configuration configurationfile="${webinf}/classes/hibernate.cfg.xml"/>
<hbm2ddl create="true" console="true" export="false" drop="true" outputfilename="characterForge.sql"/>
</htools>
</target>
<target name="ddl2hbm" depends="copy-resources">
<htools destdir="${generated-hbm}">
<jdbcconfiguration
configurationfile="${webinf}/classes/hibernate.cfg.xml"
packagename="net.digitalassembly.characterforge.reference"/>
<hbm2hbmxml/>
</htools>
</target>
Hope this helps with the originial question
Thomas