-->
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.  [ 1 post ] 
Author Message
 Post subject: hibernatetool and schema export
PostPosted: Wed Feb 21, 2007 7:39 am 
Beginner
Beginner

Joined: Wed Jan 31, 2007 11:39 am
Posts: 24
In my build.xml I had the following target so as to create a schema in a specific sql file and it worked.


<taskdef name="schemaexport"
classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="schema.classpath"/>
<target name="schema">
<schemaexport
quiet="no" text="true" drop="no" delimiter=";"
output="schema-export.sql"
config="build/WEB-INF/classes/hibernate.cfg.xml"> </schemaexport>
</target>



Because I am using Hibernate 3 I decided to use the hibernate tools to create the schema so I created the following target:

<taskdef name="schemaexportHibernate3task" classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="schema.classpath"/
<target name="schemaExportHibernate3">
<hibernatetool destdir=".">
<configuration configurationfile="build/WEB-INF/classes/hibernate.cfg.xml"/>
<hbm2ddl outputfilename="schema-export.ddl" export="false"/>
</hibernatetool>
</target>


However this target is not working and says that it cannot find my *.hbm.xml files. (The classpath is ok) Moreover why do I need a destdir in hibernatetool since I only want to fill the schema-export.ddl and not to generate any other file?

Any clue?


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

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.