Code:
<?xml version="1.0" encoding="UTF-8"?>
<project name="xdoclet2-plugin" default="xdoclet2">
<property name="fsroot" value="C:"/>
<property name="bin.dir" value="bin" />
<property name="src.dir" value="${basedir}/src" />
<property name="xdoclet2.lib.dir" value="${fsroot}/xdoclet2/lib"/>
<echo message="${xdoclet2.lib.dir}"/>
<property name="xdoclet2.plugins.dir" value="${fsroot}/xdoclet2/plugins"/>
<echo message="${xdoclet2.plugins.dir}"/>
<target name="xdoclet2">
<path id="xdoclet2.task.classpath">
<!-- xdoclet2 -->
<pathelement location="${xdoclet2.lib.dir}/xdoclet-2.0.3.jar"/>
<!-- Add the xdoclet2 plugins jar here -->
<pathelement location="${xdoclet2.plugins.dir}/xdoclet-plugin-hibernate-1.0.2.jar"/>
<!-- xdoclet2 runtime dependencies -->
<pathelement location="${xdoclet2.lib.dir}/generama-1.2.1-SNAPSHOT.jar"/>
<pathelement location="${xdoclet2.lib.dir}/picocontainer-1.0.jar"/>
<pathelement location="${xdoclet2.lib.dir}/nanocontainer-1.0-beta-3.jar"/>
<pathelement location="${xdoclet2.lib.dir}/nanocontainer-ant-1.0-beta-3.jar"/>
<pathelement location="${xdoclet2.lib.dir}/qdox-1.6-SNAPSHOT.jar"/>
<pathelement location="${xdoclet2.lib.dir}/velocity-1.4.jar"/>
<pathelement location="${xdoclet2.lib.dir}/commons-logging-1.0.4.jar"/>
<pathelement location="${xdoclet2.lib.dir}/commons-collections-3.1.jar"/>
<pathelement location="${xdoclet2.lib.dir}/commons-jelly-20050813.225330.jar"/>
<pathelement location="${xdoclet2.lib.dir}/commons-jelly-tags-define-1.0.jar"/>
<pathelement location="${xdoclet2.lib.dir}/commons-jelly-tags-jsl-1.0.jar"/>
<pathelement location="${xdoclet2.lib.dir}/saxpath-1.0-FCS.jar"/>
<pathelement location="${xdoclet2.lib.dir}/jaxen-1.1-beta-4.jar"/>
<pathelement location="${xdoclet2.lib.dir}/dom4j-1.6.jar"/>
<pathelement location="${xdoclet2.lib.dir}/commons-beanutils-1.7.0.jar"/>
<pathelement location="${xdoclet2.lib.dir}/commons-jexl-1.0.jar"/>
</path>
<echo message="${xdoclet2.task.classpath}"/>
<taskdef
name="xdoclet2"
classname="org.xdoclet.ant.XDocletTask"
classpathref="xdoclet2.task.classpath"
/>
</target>
<target name="remove" depends="xdoclet2" >
<delete>
<fileset dir="${basedir}/src">
<include name="**/*.hbm.xml"/>
</fileset>
</delete>
<echo message="remove completed"/>
</target>
<target name="hibernate" depends="remove">
<xdoclet2>
<!-- defines the file handled by xdoclet2 -->
<fileset dir="${basedir}/src">
<include name="**/vo/*.java"/>
</fileset>
<!-- defines the processing of a plugin -->
<component
classname="org.xdoclet.plugin.hibernate.HibernateMappingPlugin"
destdir="${basedir}/src"
version="3.0"
/>
</xdoclet2>
<echo message="hibernate completed"/>
</target>
</project>
C:\xdoclet2\lib
C:\xdoclet2\plugins
C:\xdoclet2\src
Above is the ant script i use for generating the hbm.xml file. However , even it is no error, i'm unable to create the hbm file, is there any1 can help me on this ? Or is there any addtional setting on eclipse or ant or classpath ?
Result what i get :
Buildfile: C:\Project\workspace\foremobile\tutorial\xdoclet2.xml
[echo] C:/xdoclet2/lib
[echo] C:/xdoclet2/plugins
xdoclet2:
[echo] ${xdoclet2.task.classpath}
BUILD SUCCESSFUL
Total time: 631 milliseconds