I try to use an build.xml file of Hibernate 2 for Hibernate 3. The hbm build
target looks like this.
Code:
<target name="build_hbm" description="builds the Java sources" >
<taskdef name="hbm2java" classname="org.hibernate.tool.ant.Hbm2JavaGeneratorTask" >
<classpath refid="project.class.path" />
</taskdef>
<mkdir dir="${build_dir}" />
<hbm2java config="hbm2java_config.xml" output="${base_dir}" >
<fileset dir="." includes="*.hbm.xml" />
</hbm2java>
</target>
Unfortunately I get this exception.
Code:
BUILD FAILED
C:\Dokumente und Einstellungen\jboss\workspace\webforum\build.xml:46: Could not create type hbm2java due to java.lang.NoSuchMethodException: org.hibernate.tool.ant.Hbm2JavaGeneratorTask.<init>(org.apache.tools.ant.Project)