I think everyone here would only recomened using ant or the eclipse plug in to do your reverse engerneared pojo generation. personaly i'd recomend and ant script like this:
Code:
<project name="goFurtherTools" basedir="../" default="hibernateCodeGen">
<property name="tools.dir" value="tools" />
<property name="src.dir" value="src" />
<property name="web.dir" value="web" />
<property name="test.src" value="test" />
<property name="lib.dir" value="${web.dir}/lib" />
<property name="build.dir" value="build" />
<property name="test.dir" value="${build.dir}/test" />
<property name="webapp.name" value="goFurther" />
<property name="gen.dir" value="gen" />
<property environment="env" />
<property name="ant.home" value="${env.ANT_HOME}" />
<property name="tomcat.home" value="${env.CATALINA_HOME}" />
<property name="tomcat.lib.dir" value="${tomcat.home}/common/lib" />
<path id="classpath">
<pathelement path="${java.class.path}/" />
<pathelement path="${build.dir}/classes" />
<pathelement path="${build.dir}/test/classes" />
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<path id="toolslib">
<path location="lib/hibernate-tools.jar" />
<path location="lib/hibernate3.jar" />
<path location="lib/freemarker.jar" />
<path location="${jdbc.driver.jar}" />
</path>
<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="toolslib" />
<target name="hibernateCodeGen">
<copy todir="${build.dir}/classes" includeemptydirs="false" overwrite="true">
<fileset dir="${tools.dir}/hibernate/config">
<include name="*.*" />
</fileset>
</copy>
<delete failonerror="false">
<fileset dir="${tools.dir}/hibernate/generated/uk/ltd/goFurther/domain/data">
<include name="*.*" />
</fileset>
</delete>
<delete failonerror="false">
<fileset dir="${tools.dir}/hibernate/generated/uk/ltd/goFurther/dao/base/hibernate">
<include name="*.*" />
</fileset>
</delete>
<delete failonerror="false">
<fileset dir="${tools.dir}/hibernate/generated/config">
<include name="*.*" />
</fileset>
</delete>
<delete dir="${tools.dir}/hibernate/generated"/>
<hibernatetool
destdir="${tools.dir}/hibernate/generated"
templatepath="${tools.dir}/hibernate/templates"
>
<classpath>
<path location="${build.dir}/classes" />
<path location="${basedir}/lib" />
</classpath>
<jdbcconfiguration
packagename="uk.ltd.goFurther.domain"
propertyfile="${tools.dir}/hibernate/config/hibernate.properties"
reversestrategy="uk.ltd.goFurther.tools.hibernate.reverseEngineering.CustomReverseEngineeringStrategy"
revengfile="${tools.dir}/hibernate/config/hibernate.reveng.xml"
/>
<hbm2hbmxml />
</hibernatetool>
<hibernatetool
destdir="${tools.dir}/hibernate/generated"
templatepath="${tools.dir}/hibernate/templates"
>
<classpath>
<path location="${build.dir}/classes" />
<path location="${basedir}/lib" />
</classpath>
<jdbcconfiguration
packagename="uk.ltd.goFurther.domain.data"
propertyfile="${tools.dir}/hibernate/config/hibernate.properties"
reversestrategy="uk.ltd.goFurther.tools.hibernate.reverseEngineering.CustomReverseEngineeringStrategy"
revengfile="${tools.dir}/hibernate/config/hibernate.reveng.xml"
/>
<hbm2java />
</hibernatetool>
<copy todir="${tools.dir}/hibernate/generated/config" includeemptydirs="false" overwrite="true">
<fileset dir="${tools.dir}/hibernate/generated/uk/ltd/goFurther/domain">
<include name="*.hbm.xml" />
</fileset>
</copy>
<delete>
<fileset dir="${tools.dir}/hibernate/generated/uk/ltd/goFurther/domain">
<include name="*.hbm.xml" />
</fileset>
</delete>
<mkdir dir="${tools.dir}/hibernate/generated/tmp"/>
<copy todir="${tools.dir}/hibernate/generated/tmp" includeemptydirs="false" overwrite="true">
<fileset dir="${tools.dir}/hibernate/generated/uk/ltd/goFurther/domain/data">
<include name="*.*" />
</fileset>
<globmapper from="*.java" to="*Data.java"/>
</copy>
<delete>
<fileset dir="${tools.dir}/hibernate/generated/uk/ltd/goFurther/domain/data">
<include name="*.java" />
</fileset>
</delete>
<copy todir="${tools.dir}/hibernate/generated/uk/ltd/goFurther/domain/data" includeemptydirs="false" overwrite="true">
<fileset dir="${tools.dir}/hibernate/generated/tmp">
<include name="*.java" />
</fileset>
</copy>
<delete failonerror="false">
<fileset dir="${tools.dir}/hibernate/generated/tmp">
<include name="*.*" />
</fileset>
</delete>
<hibernatetool
destdir="${tools.dir}/hibernate/generated"
templatepath="${tools.dir}/hibernate/templates"
>
<classpath>
<path location="${build.dir}/classes" />
<path location="${basedir}/lib" />
</classpath>
<jdbcconfiguration
packagename="uk.ltd.goFurther.dao.base.hibernate"
propertyfile="${tools.dir}/hibernate/config/hibernate.properties"
reversestrategy="uk.ltd.goFurther.tools.hibernate.reverseEngineering.CustomReverseEngineeringStrategy"
revengfile="${tools.dir}/hibernate/config/hibernate.reveng.xml"
/>
<hbm2dao />
</hibernatetool>
<copy todir="${tools.dir}/hibernate/generated/tmp" includeemptydirs="false" overwrite="true">
<fileset dir="${tools.dir}/hibernate/generated/uk/ltd/goFurther/dao/base/hibernate">
<include name="*.*" />
</fileset>
<globmapper from="*Home.java" to="*DAOBaseHibernate.java"/>
</copy>
<delete failonerror="false">
<fileset dir="${tools.dir}/hibernate/generated/uk/ltd/goFurther/dao/base/hibernate">
<include name="*.*" />
</fileset>
</delete>
<copy todir="${tools.dir}/hibernate/generated/uk/ltd/goFurther/dao/base/hibernate" includeemptydirs="false" overwrite="true">
<fileset dir="${tools.dir}/hibernate/generated/tmp">
<include name="*.*" />
</fileset>
</copy>
<delete failonerror="false">
<fileset dir="${tools.dir}/hibernate/generated/tmp">
<include name="*.*" />
</fileset>
</delete>
<delete dir="${tools.dir}/hibernate/generated/tmp"/>
<delete failonerror="false">
<fileset dir="${src.dir}/java/uk/ltd/goFurther/dao/base/hibernate">
<include name="*.*" />
</fileset>
</delete>
<delete failonerror="false">
<fileset dir="${src.dir}/java/uk/ltd/goFurther/domain/data">
<include name="*.*" />
</fileset>
</delete>
<delete failonerror="false">
<fileset dir="${src.dir}/java/uk/ltd/goFurther/domain/conf">
<include name="*.*" />
</fileset>
</delete>
<copy todir="${src.dir}/java/uk/ltd/goFurther/dao/base/hibernate" includeemptydirs="false" overwrite="true">
<fileset dir="${tools.dir}/hibernate/generated/uk/ltd/goFurther/dao/base/hibernate">
<include name="*.*" />
</fileset>
</copy>
<copy todir="${src.dir}/java/uk/ltd/goFurther/domain/data" includeemptydirs="false" overwrite="true">
<fileset dir="${tools.dir}/hibernate/generated/uk/ltd/goFurther/domain/data">
<include name="*.*" />
</fileset>
</copy>
<copy todir="${src.dir}/java/uk/ltd/goFurther/domain/conf" includeemptydirs="false" overwrite="true">
<fileset dir="${tools.dir}/hibernate/generated/config">
<include name="*.*" />
</fileset>
</copy>
</target>
</project>