I 'm trying to generate ".hbm.xml" from a Java source code using the tool chain, XDoclet1.2.3, Hibernate3.1.2 and Apache-ant-1.6.5, but so far I have no success. I thought this is a very simple process but somehow I can not get out this hell for the last four days. I'm so exhausted. Please help...
Following is the snippet I use for this.
Taskdef
Code:
<taskdef name="hibernatedoclet"
classname="xdoclet.modules.hibernate.HibernateDocletTask">
<classpath refid="classpath" />
</taskdef>
and Task
Code:
<target name="hbmxdoclet"
description="Generates Hibernate mapping files with XDoclet.">
<hibernatedoclet
destdir="${src}"
excludedtags="@version,@author,@todo"
force="true"
mergedir="${build}"
verbose="true">
<fileset dir="${src}">
<include name="**/*.java"/>
</fileset>
<hibernate version="3.0"/>
</hibernatedoclet>
</target>
I have "Message.java" under the src directory and "build.xml" one directory above. I'm hoping to get "Message.hbm.xml" under the src directory by running Ant with the command, "ant hbmxdoclet". However, XDoclet does not generate any file even though Ant finds "xdoclet.modules.hibernate.HibernateDocletTask" properly and gives me the "BUILD SUCCESSFUL" message on the screen.
I've tested the same thing on both Linux and WinXP but the result is the same. Am I doing something worng here? Is there anything else I should check? I appreciate any advice.