-->
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: hbm2java in H3 changed????
PostPosted: Tue May 17, 2005 8:01 pm 
Newbie

Joined: Thu Mar 31, 2005 7:39 pm
Posts: 8
Looks like hbm2java ant task as shown in "Hibernate in Action" book has changed from H3 onwards. The example shown on page 363 doesnt seem to be supported anymore.

I skimmed through the forum and looks like many people have figured out ways.

Can somebody help me with the exact ant script to generate pojos from hbm files and list of required jars to be placed in the ant classpath?

Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 18, 2005 1:23 pm 
Regular
Regular

Joined: Mon Apr 25, 2005 9:22 am
Posts: 62
Location: Bucharest/Romania
Maybe this will give you an idea ;-)
http://cvs.sourceforge.net/viewcvs.py/* ... ml?rev=1.8


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 18, 2005 4:32 pm 
Newbie

Joined: Thu Mar 31, 2005 7:39 pm
Posts: 8
thanks to Alex's pointer

My hbm2java ant task is working as expected.

This is what i had to do.

<target name="hbm2java" depends="init">
<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpath="${classpath}" />
<hibernatetool destdir="${generated.pojo.dir}">
<configuration>
<fileset dir="${hibernate.mappings.dir}" />
</configuration>
<hbm2java />
</hibernatetool>
</target>

Classpath

commons-logging-1.0.4.jar
velocity-1.4.jar
velocity-tools-generic-1.1.jar
hibernate3.jar
hibernate-tools.jar
dom4j-1.5.2.jar
commons-collections-2.1.1.jar


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.