Thanx, until I find some time to debug the code I sent this info in case somebody has similar problems ....
Here a simple example. Initially generated with Middlegen and edited to add the new meta tags
From the error it seam slike ant is having problems. Using exaqct same ant file and Hbm mapping file
it works file with the 2.0.3 hibernate-tools.jar ...
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping default-cascade="save-update">
<!--
Created by the Middlegen Hibernate plugin
http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->
<class
name="com.xyz.hibernate.model.TestCountry"
table="TEST_COUNTRY"
>
<meta attribute="implement-equals"/>
<id
name="countryS"
type="java.lang.String"
column="COUNTRY_S"
>
<meta attribute="use-in-equals"/>
<generator class="assigned" />
</id>
<property
name="name"
type="java.lang.String"
column="NAME"
not-null="true"
length="40"
/>
</class>
</hibernate-mapping>
And the ant parts of intrests are where the hibernate/tools contains the new hibernate-tools.jar file
<path id="gen-src.class.path">
<pathelement path="${classes.dir}"/>
<fileset dir="${dev.home}/hibernate">
<include name="hibernate2.jar"/>
</fileset>
<fileset dir="${dev.home}/hibernate/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${dev.home}/hibernate/tools">
<include name="*.jar"/>
</fileset>
<fileset dir="${dev.home}/hibernate/tools/lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="gen-src" unless="gen-src.not.required">
<taskdef
name="hbm2java"
classname="net.sf.hibernate.tool.hbm2java.Hbm2JavaTask"
classpathref="gen-src.class.path"
/>
<hbm2java output="${src.dir}" classpathref="gen-src.class.path">
<fileset dir="${src.dir}/com/xyz/hibernate/model">
<include name="**/*.hbm.xml"/>
</fileset>
</hbm2java>
</target>
Best
B-)