-->
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.  [ 7 posts ] 
Author Message
 Post subject: SchemaExportTask not working with annotated classes
PostPosted: Sun Apr 17, 2005 5:33 am 
Newbie

Joined: Tue Mar 08, 2005 9:09 am
Posts: 8
Location: Munich
Hi,

I use the schema export ant task in order to export DDL for some annotated classes. Now there is no way (or am I wrong?) to specify that the task should use a AnnotationConfiguration instead of the normal one. I have modified the file so now it works only with AnnotationConfiguration. I just wanted to make sure you know of the problem. If you already have a solution I would surely be interested in it.

Thanks,
Dimo

Hibernate version: 3.0


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 18, 2005 7:46 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
The ant task supports it AFAIK
http://opensource.atlassian.com/projects/hibernate/browse/HBX-112

_________________
Emmanuel


Top
 Profile  
 
 Post subject: Where do I find it
PostPosted: Thu Apr 21, 2005 8:49 pm 
Newbie

Joined: Tue Mar 08, 2005 9:09 am
Posts: 8
Location: Munich
Thanks, but where do I find the class? Which package?
Dimo


Top
 Profile  
 
 Post subject: Re: Where do I find it
PostPosted: Sat Apr 30, 2005 11:13 pm 
Newbie

Joined: Sat Apr 30, 2005 11:00 pm
Posts: 2
dimo.velev wrote:
Thanks, but where do I find the class? Which package?
Dimo


I am also trying to figure out how to use SchemaExport along with Hibernate Annotations.

I ran accross several mailing list posts that mentioned these new tools:
http://cvs.sourceforge.net/viewcvs.py/h ... /tool/ant/

I was able to download the HibernateExt project from CVS, switch into the tools subsirectory, and build (via ant) the hibernate-tools.jar file which contains the new org.hibernate.tool.ant.HibernateToolTask. However, I have not figured out how to run it succesfully.

I tried the following ant config:

Code:
        <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask"
            classpathref="my.classpath"/>
        <hibernatetool destdir="target">
            <classpath refid="my.classpath"/>
            <annotationconfiguration/>
            <hbm2ddl drop="true" outputfilename="schema.sql"/>
        </hibernatetool>


and that resulted in the following output from ant:

Code:
[hibernatetool] 1. task: hbm2ddl (Generates database schema)

BUILD FAILED
java.lang.ExceptionInInitializerError


Any help would be appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 02, 2005 6:20 am 
Newbie

Joined: Tue Mar 08, 2005 9:09 am
Posts: 8
Location: Munich
I also had problems running the cvs version, so I wrote my own task. If you cannot figure how to do this, i can send you the ant tasks java source file.
Dimo


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 02, 2005 8:44 pm 
Newbie

Joined: Sat Apr 30, 2005 11:00 pm
Posts: 2
dimo.velev wrote:
I also had problems running the cvs version, so I wrote my own task. If you cannot figure how to do this, i can send you the ant tasks java source file.
Dimo

Sure, I'd like to see your ant task source code. If it isn't too long, why not just paste it here as a reply so others can see it too. Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 17, 2005 8:48 pm 
Newbie

Joined: Tue May 17, 2005 8:46 pm
Posts: 4
kweiner wrote:
dimo.velev wrote:
I also had problems running the cvs version, so I wrote my own task. If you cannot figure how to do this, i can send you the ant tasks java source file.
Dimo

Sure, I'd like to see your ant task source code. If it isn't too long, why not just paste it here as a reply so others can see it too. Thanks!


me too

could you post the source code please ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.