Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.0
Hi All,
I am facing a problem in adding a hbm.xml file to hibernate.cfg.xml file.
I have a hbm.xml file manually created and I want this file to be added to the hibernate.cfg.xml file while I am actually generating the HBM files and hibernate.cfg.xml file using ANT task.
I am using the following Hibernate Plugin to generate my HBM and hibernate.cfg.xml files
<taskdef name="xdoclet" classname="org.xdoclet.ant.XDocletTask" classpathref="xdoclet.classpath" />
<!-- generate .hbm files -->
<xdoclet verbose="false">
<!-- defines the file handled by xdoclet2 -->
<fileset dir="${project.model.package}">
<include name="model/core/*.java"/>
<include name="loanCase/*.java"/>
<include name="loanCase/caseTask/*.java"/>
</fileset>
<!-- defines the processing of the hibernate plugin -->
<component
classname="org.xdoclet.plugin.hibernate.HibernateMappingPlugin"
destdir="${project.model.package}"
version="3.0"/>
<component
classname="org.xdoclet.plugin.hibernate.HibernateConfigPlugin"
destdir="${src.dir}"
version="3.0"
properties="${project.model.package}/hibernate.build.properties"/>
</xdoclet>
Can any one please guide me how to add a hbm.xml file to the hibernate.cfg.xml file using ANT task.
Thanks in advance.
Rohit