Hibernate version: 2.1.8
Ant version : 1.6.5
Hi,
I want to do a shema update with Ant, and I encounter a problem.
SchemaUpdate can't find the persistent classes ( net.sf.hibernate.MappingException: persistent class [ xxx ] not found).
I'm sure of the classpath I've initialized. The classes are in this classpath.
My Ant script works in a Windows XP environment (Command line utility : cmd.exe), in an Eclipse 3.1 environment, but I can't make it work in a Linux environment.
To make it work, I have to launch Ant specifying the classpath of my persistent classes in the command line (with the -lib option). I'd like to not have to do that and to initialize the classpath in the Ant script.
<path id="class.path">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
<pathelement path="${work.dir}/bin/PathToClasses"/>
</path>
<target name="schemaupdate">
<taskdef name="schemaupdate"
classname="net.sf.hibernate.tool.hbm2ddl.SchemaUpdateTask"
classpathref="class.path"/>
<schemaupdate
properties="hibernate.properties"
quiet="no">
<fileset dir="src">
<include name="**/*.hbm.xml"/>
</fileset>
</schemaupdate>
</target>
Am I missing something ?
Any idea on how to make my script work in a Linux environment ?
Regards,
A. ROY
|