Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate/xdoclet works in one directory but not another

 
Siegfried Heintze
Ranch Hand
Posts: 408
  • 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 ("Person.java") 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 Blog.java 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.

Thanks,
Siegfried

<?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>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>

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

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

<hibernate version="2.0" />
</hibernatedoclet>
</target>
</project>
 
Wim Drapier
Greenhorn
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic