On 02 Apr 2004 09:39, Acco Lade wrote:
>On 02 Apr 2004 09:37, Acco Lade wrote:
>>I downloaded the package and ran it against a mysql database, and
>>well, how do I get my .java files? :-)
>>I do see my relationships and a bunch of .hbm.xml files, but nothing
>>else.
>>Did I miss something?
>>Thanks,
>>Acco
>Correction: I used version R4 and the latest xyz-11 JDBC connector
>from mysql.
One way to get it working is to:
1. add target hbm2java(I copied it from the Middlegen build.xml) to
your build.xml.
2. modify target compile-hibernate by adding hbm2java to the depends
(see below).
3. add any missing .jars from Middlegen. To download Middlegen you
can go to: http://sourceforge.net/project/showfiles.php?group_id=36044
then unzip the files. I was in a rush so I copied the files in the
Middlegen lib folder to your lib folder. You may only need to add the
hibernate jars ??
<!-- ============================================================= -->
<!-- Run hbm2java -->
<!-- ============================================================= -->
<target name="hbm2java" depends="middlegen"
description="Generate .java from .hbm files.">
<taskdef
name="hbm2java"
classname="net.sf.hibernate.tool.hbm2java.Hbm2JavaTask"
classpathref="lib.class.path"
/>
<hbm2java output="${build.gen-src.dir}">
<fileset dir="${build.gen-src.dir}">
<include name="**/*.hbm.xml"/>
</fileset>
</hbm2java>
</target>
---------------------------------------------------
<!-- ============================================================= -->
<!-- Compile business logic (hibernate) -->
<!-- ============================================================ -->
<target name="compile-hibernate" depends="middlegen, hbm2java"
description="Compile hibernate Business Domain Model">
... |