Hi all,
I am trying to reverse engineer the DB and produce my .hbm.xml files using ant.
Here is my latest (of many) version of build.xml:
Code:
<project basedir="." name="MyBooks" default="compile">
<property name="sourcedir" value="${basedir}/src"/>
<property name="targetdir" value="${basedir}/bin"/>
<property name="librarydir" value="${basedir}/lib"/>
<path id="libraries">
<fileset dir="${librarydir}">
<include name="*.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="${targetdir}"/>
<mkdir dir="${targetdir}"/>
</target>
<target name="compile" depends="clean, copy-resources, generate_files">
<javac destdir="${targetdir}">
<src path="${sourcedir}"/>
<classpath refid ="libraries"/>
</javac>
</target>
<target name="copy-resources">
<copy todir="${targetdir}">
<fileset dir="${sourcedir}">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<taskdef
name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="libraries"/>
<target name="generate_files">
<hibernatetool>
<jdbcconfiguration configurationfile="hibernate.cfg.xml"/>
<destdir="${sourcedir}/xml"/>
</hibernatetool>
</target>
</project>
I get the following error:
C:\Projects\Hibernate\MyBooks\build.xml:64: The <hibernatetool> type doesn't support the nested "hbm2hbmxml" element.
Any ideas?
Thanks,
Howard