Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

hibernate/xdoclet works in one directory but not another  RSS feed

Siegfried Heintze
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a simple eclipse project and I cannot get the hibernatedoclet to work. No errors but no hbm files either.

So I downloaded the code that accompanies the book XDoclet in Action and ran the build files. Viola -- I get Blog.hbm.xml files. OK, so I move my one pojo ("") from my eclipse project file to the "XDoclet in Action" directory and run the build again and I get Person.hbm.xml. Good.

So I move and rename my build file that came with the "XDoclet in Action" files to my eclipse project. I also move to my eclipse project and run the same build file that worked before. No luck. No error messages. No hbm files.

I know that hibernate is reading the files because it complains if I introduce syntax errors.


<?xml version="1.0" encoding="UTF-8"?>

<project name="Blog" default="generate-hibernate" basedir=".">
<property name="xdoclet.lib.dir" value="C:\Documents and Settings\Siegfried\My Documents\dev\XDoclet\xdoclet-1.2.3\lib" />
<property name="lib.dir" value="C:\Documents and Settings\Siegfried\My Documents\dev\hibernate\hibernate-3.0" />
<property name="hibernate.dir" value="hbm2" />
<property name="src.dir" value="com/puregamesinc/dao/src" />
<property name="merge.dir" value="merge" />

<path id="xdoclet.lib.path">
<fileset dir="${xdoclet.lib.dir}">
<include name="*.jar"/>
<fileset dir="${lib.dir}">
<include name="*.jar"/>

<target name="generate-hibernate">
<taskdef name="hibernatedoclet"
classpathref="xdoclet.lib.path" />

<!-- Generate Hibernate mapping files -->
<hibernatedoclet destdir="${hibernate.dir}"
<fileset dir="com/puregamesinc/dao/src">
<include name="**/" />

<hibernate version="2.0" />
Wim Drapier
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a guess by taking a quick look at the ant code and I see some Spaces. This is not a good idea, so you may want to try again after you moved your files to a directory that has no spaces.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!