Sven L. penned
The build.xml file works without an exception but it does not generate the mapping file for hibernate.
This looks suspect:
<fileset dir="${srcDir}/persistence"> <include name="*.java"/> </fileset>
Try using "**/*.java" to search all subdirectories for the source files to be processed.
Hello David,
your idea made it work for me thank you very much. The new build.xml looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Messaging" default="build" basedir=".">
<property name="srcDir" location="WEB-INF/src"/>
<property name="buildDir" location="WEB-INF/classes"/>
<property name="libDir" location="WEB-INF/lib"/>
<property name="xdocletDir" location="WEB-INF/lib/xdoclet"/>
<property name="tomcatDir" location="../../common/lib"/>
<path id="class.path">
<fileset dir="${libDir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${tomcatDir}">
<include name="*.jar"/>
</fileset>
</path>
<path id="class.path.xdoclet">
<fileset dir="${xdocletDir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${libDir}">
<include name="commons-logging.jar"/>
</fileset>
</path>
<target name="init">
<taskdef name="xdoclet" classname="xdoclet.DocletTask" classpathref="class.path.xdoclet"/>
<taskdef name="hibernatedoclet" classname="xdoclet.modules.hibernate.HibernateDocletTask" classpathref="class.path.xdoclet"/>
</target>
<target name="compile" depends="init">
<javac srcdir="${srcDir}/messaging" destdir="${buildDir}" classpathref="class.path"/>
<javac srcdir="${srcDir}/persistence" destdir="${buildDir}" classpathref="class.path"/>
</target>
<target name="hibernate" depends="compile">
<hibernatedoclet destdir="${buildDir}"
excludedtags="@version,@author,@todo,@see"
addedtags="@xdoclet-generated at ${TODAY},@copyright The XDoclet Team,@author XDoclet,@version ${version}"
force="true"
verbose="true">
<fileset dir="${srcDir}">
<include name="**/*.java"/>
</fileset>
<hibernate version="2.1"/>
</hibernatedoclet>
</target>
<target name="build" depends="hibernate">
<copy file="${srcDir}/messaging/application.properties" todir="${buildDir}/messaging"/>
</target>
<target name="clean">
<delete>
<fileset dir="${buildDir}/persistence">
<include name="*"/>
</fileset>
<fileset dir="${buildDir}/messaging">
<include name="*"/>
</fileset>
</delete>
</target>
</project>
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ xdoclet-user mailing list xdoclet-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-user