Hi,
I have been trying to use hibernate tools to write the database schema updates to an external file.
But I realized the following, if I add a new property to certain class and then run the hibernateToolTask nothing is written to the outputfile (it's not even created).
I'm using hibernate 3 ,spring framework 1.2 and hibernate tools alpha5.
Here is my ant task.
Code:
<path id="hibernateTool.classpath">
<fileset dir="${tomcat.home}/webapps/4s/WEB-INF/lib" includes="hibernate3.jar"/>
<fileset dir="${tomcat.home}/webapps/4s/WEB-INF/lib" includes="hibernate-tools*.jar"/>
<fileset dir="${tomcat.home}/webapps/4s/WEB-INF/lib" includes="mysql-connector-java*.jar"/>
<fileset dir="${tomcat.home}/webapps/4s/WEB-INF/lib" includes="velocity*.jar"/>
<fileset dir="${tomcat.home}/webapps/4s/WEB-INF/lib" includes="jtidy*.jar"/>
<fileset dir="${tomcat.home}/webapps/4s/WEB-INF/lib" includes="commons*.jar"/>
<fileset dir="${tomcat.home}/webapps/4s/WEB-INF/lib" includes="hibernate-annotations.jar"/>
<fileset dir="${tomcat.home}/webapps/4s/WEB-INF/lib" includes="dom4j*.jar"/>
<fileset dir="${tomcat.home}/webapps/4s/WEB-INF/lib" includes="ejb3-persistence.jar"/>
<pathelement location="${tomcat.home}/webapps/4s/WEB-INF/classes"/>
</path>
<target name="hibernatetool">
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="hibernateTool.classpath"/>
<hibernatetool destdir="${tomcat.home}/webapps/4s/ant">
<annotationconfiguration configurationfile="hibernate.cfg.xml"/>
<hbm2ddl
export="false"
drop="false"
update="true"
outputfilename="schema.sql"
delimiter = ";"/>
</hibernatetool>
</target>
I don't no what's the problem I see the alter statment written to the console but nothing is written to the output file.
I f anyone could help me I would be very thankful.
Thanks in Advance.
Sherihan.