This content has been marked as final.
Show 1 reply
-
1. Re: Configure seam-gen to use hbm.xml instead of annotated classes
rafaelri Feb 12, 2010 5:55 PM (in response to rafaelri)We were able to figure out after a few more attempts.
Locate the following code on seam-gen\build.xml<target name="generate-model" depends="validate-project,init-generate"> <echo message="Reverse engineering database using JDBC driver ${driver.jar}"/> <echo>project=${project.home}</echo> <echo>model=${model.package}</echo> <hibernate templatepath="${templates.dir}"> <jdbcconfiguration propertyfile="${seam-gen.properties}" packagename="${model.package}" revengfile="${project.home}/resources/seam-gen.reveng.xml" detectmanytomany="false"/> <property key="hibernatetool.util.toolclass" value="org.jboss.seam.tool.Util"/> <hbm2hbmxml destdir="${project.home}/src/main"/> <hbm2java jdk5="true" ejb3="false" destdir="${project.home}/src/main"/> </hibernate> <taskdef name="javaformatter" classname="org.hibernate.tool.ant.JavaFormatterTask" classpathref="htools.classpath"/> <javaformatter> <fileset dir="${project.home}/src/main"> <include name="**/*.java"/> </fileset> </javaformatter> </target>
The example above is already changed to output hbm.xml files, the changes are:
- Setting ejb3=
false
- And adding the tag hbm2hbmxml
In summary... the most relevant lines are
<hbm2hbmxml destdir="${project.home}/src/main"/> <hbm2java jdk5="true" ejb3="false" destdir="${project.home}/src/main"/>
- Setting ejb3=