• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate reverse engineering Ant script  RSS feed

Siva Devendra
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any one helps me to create the reverse engineering build script for Oracle tables with separate package for group of tables using ANT script.

Below mentioned Ant script is generating hbm and POJO classes for one set of tables (in one package), where do I need to change the script to create a separate package for more than one set of tables.

<target name="testjava" depends="init" description="generate hibernate POJO, ADO and schema help files from database schema">
<taskdef name="hibernateTool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="class.prod.path"/>
<hibernateTool destdir="${src.dir}">
<jdbcconfiguration configurationfile="hibernate.cfg.xml" packagename="${package.name}" revengfile=" hibernate.reveng.xml"/>
<hbm2java jdk5="false" ejb3="false"/>
<hbm2cfgxml ejb3="false"/>
<copy todir="${classes.dir}/com/dataaccess/test">
<fileset dir="${src.dir}/com/dataaccess/test/">
<include name="*.xml"/>
<move file="${src.dir}/hibernate.cfg.xml" tofile="${src.dir}/hibernate.cfg.xml"/>
<jar compress="true" jarfile="${pub.dir}/${hibernateConfig.jar}">
<attribute name="Created-By" value="${projectName} development team, ${TODAY}"/>
<attribute name="Implementation-Version" value="${targetVersion}"/>
<attribute name="Implementation-Title" value="${manifest.title}"/>
<attribute name="Implementation-Vendor" value="${manifest.vendor}"/>
<attribute name="Class-Path" value="${manifest.class.path}"/>
<fileset dir="${src.dir}">
<include name="hibernate.cfg.xml"/>
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!