Hi,
I am using Hibernate ant tools to reverse engineer classes. However, the jdk5 and ejb3 options are not available to me with the exporters. Please advise.
hibernate-distribution-3.3.2.GA
hibernate-annotations-3.4.0.GA
hibernate-entitymanager-3.4.0.GA
HibernateTools-3.2.4.GA
hsqldb-1.8.0.10
Eclipse 3.4.2 Ganymede
Classpath: build;lib\antlr-2.7.6.jar;lib\asm.jar;lib\c3p0-0.9.1.jar;lib\cglib-2.1.3.jar;lib\commons-collections-3.1.jar;lib\commons-logging.jar;lib\dom4j-1.6.1.jar;lib\ejb3-persistence.jar;lib\freemarker.jar;lib\hibernate-annotations.jar;lib\hibernate-commons-annotations.jar;lib\hibernate-entitymanager.jar;lib\hibernate-tools.jar;lib\hibernate3.jar;lib\hsqldb.jar;lib\javassist-3.9.0.GA.jar;lib\jta-1.1.jar;lib\jtidy-r8-20060801.jar;lib\log4j.jar;lib\servlet-api.jar;lib\slf4j-api-1.5.8.jar;lib\slf4j-jdk14-1.5.8.jar; (and a lot Eclipse jars)
Build script snippet:
Code:
<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="project.classpath" />
<target name="schemaexport" depends="compile, copymetafiles" description="Export a generated schema to DB and file">
<hibernatetool destdir="${db.dir}">
<classpath path="${build.dir}" />
<configuration configurationfile="${build.dir}/hibernate.cfg.xml" />
<hbm2ddl drop="true" create="true" export="true" outputfilename="helloworld-ddl.sql" delimiter=";" format="true" />
</hibernatetool>
</target>
<target name="reveng.hbmxml" description="Produce XML mapping files in src directory">
<hibernatetool destdir="${src.java.dir}">
<jdbcconfiguration propertyfile="${db.dir}/library.db.properties" revengfile="${db.dir}/library.reveng.xml" />
<!-- Export Hibernate XML files -->
<hbm2hbmxml />
<!-- Export a hibernate.cfg.xml file -->
<hbm2cfgxml />
</hibernatetool>
</target>
<target name="reveng.pojos" depends="reveng.hbmxml" description="Produce Java classes from XML mappings">
<hibernatetool destdir="${src.java.dir}">
<configuration>
<fileset dir="${src.java.dir}">
<include name="**/*.hbm.xml" />
</fileset>
</configuration>
<hbm2java />
<!-- Generate entity class source -->
</hibernatetool>
</target>