Regular |
|
Joined: Thu Aug 05, 2004 11:15 pm Posts: 50
|
In hibernate 2.1 I used this in my build file to generate code:
<!-- Teach Ant how to use Hibernate's code generation tool -->
<taskdef name="hbm2java"
classname="net.sf.hibernate.tool.hbm2java.Hbm2JavaTask"
classpathref="project.class.path"/>
<!-- Generate the java code for all mapping files in our source tree -->
<target name="codegen" depends="prepare"
description="Generate Java source from the O/R mapping files">
<hbm2java output="${source.root}">
<fileset dir="${source.root}">
<include name="**/*.hbm.xml"/>
</fileset>
</hbm2java>
</target>
The net.sf.hibernate.tool.hbm2java.Hbm2JavaTask comes from the hibernate2.jar file.
I want to convert my build file and code to Hibernate 3.0 . With Hibernate 3.0 there is now hibernate3.jar instead of hibernate2.jar. I can't seem to get the codegen working now, because the classpath name will be different now so it will not be: net.sf.hibernate.tool.hbm2java.Hbm2JavaTask. Can someone help me with this and tell me the classpath name or how they did 'codegen' in their build file? Any help appreciated.
Thank you,
John
|
|