0 Replies Latest reply on Oct 9, 2009 10:33 AM by elhanan

    trying to use hbm2ddl for envers...

    elhanan

      hi as before i tried to use hbm2ddl in a simple way:
      how ever for some reason, it says classnot found exception on my mapped class, if i try to configure ant via eclipse , it's ok, but then envers won't generate any sql defintions.

      <target name="schemaexport"
       description="Exports a generated schema to DB and file">
      
       <path id="cp" >
       <path location="bin/com/pnx/pmptest/bo/orm"/>
       <path location="."/>
       <fileset dir="./lib" >
       <include name="*.jar"/>
       </fileset>
       <fileset dir ="../../framework/libs" >
       <include name="*.jar"/>
       </fileset>
       <fileset dir ="../../framework" >
       <include name="*.jar"/>
       </fileset>
       </path>
      
       <echo message="${toString:cp}"></echo>
       <taskdef name="hibernatetool"
       classname="org.hibernate.tool.ant.EnversHibernateToolTask"
       classpathref="cp">
       </taskdef>
      
       <hibernatetool destdir=".">
       <classpath id="lcp">
       <path refid="cp"/>
      
      
      
       </classpath>
      
       <annotationconfiguration configurationfile="hibernate.cfg.xml" propertyfile="hibernate.properties"/>
       <hbm2ddl
       drop="false"
       create="true"
       export="false"
       outputfilename="versioning-ddl.sql"
       delimiter=";"
       format="true"/>
       </hibernatetool>
      </target>

      h