I use ant task in the new toolset, and still for some reason I always get drop statements in the schema export file, regardless of drop="no" (if, however, I put create="no", I get only drop statements). Here's my target:
Code:
<target name="ddl" description="Generate DDL from Hibernate files" depends="compile, xdoclet">
<path id="hibernatetool-classpath">
<pathelement location="${lib.dir}/cglib/cglib-nodep-2.1.jar"/>
<pathelement location="${lib.dir}/commons/commons-collections.jar"/>
<pathelement location="${lib.dir}/commons/commons-logging.jar"/>
<pathelement location="${lib.dir}/dom4j/dom4j-1.6.jar"/>
<pathelement location="${lib.dir}/hibernate/hibernate-tools.jar"/>
<pathelement location="${lib.dir}/hibernate/hibernate3.jar"/>
<pathelement location="${lib.dir}/javax/jta.jar"/>
<pathelement location="${lib.dir}/velocity/velocity-1.4.jar"/>
<pathelement location="${lib.dir}/velocity/velocity-tools-generic-1.1.jar"/>
<pathelement path="${classes.dir}"/>
</path>
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="hibernatetool-classpath"/>
<mkdir dir="${ddl.dir}"/>
<hibernatetool>
<configuration propertyfile="${conf.dir}/hibernate.properties">
<fileset dir="${hibernate.dir}">
<include name="**/*.hbm.xml"/>
</fileset>
</configuration>
<hbm2ddl destdir="${ddl.dir}" export="false" console="false" drop="no" create="yes"
outputfilename="create_objects.sql" delimiter=";"/>
</hibernatetool>
</target>
Could you give a hint, please?
Code: