-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: SchemaUpdate with Ant
PostPosted: Wed Feb 22, 2006 4:53 am 
Newbie

Joined: Tue Feb 21, 2006 1:10 pm
Posts: 2
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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 22, 2006 6:41 am 
Beginner
Beginner

Joined: Wed Aug 04, 2004 4:33 am
Posts: 45
Location: Switzerland
Is the ${lib.dir} defined?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 22, 2006 7:06 am 
Newbie

Joined: Tue Feb 21, 2006 1:10 pm
Posts: 2
Yes, it is.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.