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.  [ 4 posts ] 
Author Message
 Post subject: What is Hbm2JavaTask equivalen in Hibernate 3.0
PostPosted: Mon Oct 31, 2005 3:08 pm 
Newbie

Joined: Thu Oct 06, 2005 9:30 am
Posts: 18
Location: Canada
I have been looking net.sf.hibernate.tool.hbm2java.Hbm2JavaTask in
org.hibernate.tool.hbm2ddl, but it is not there

I was thinking that if there is any other calass instead of Hbm2JavaTask


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 31, 2005 4:21 pm 
Newbie

Joined: Sun Oct 30, 2005 2:38 pm
Posts: 9
Location: Goodyear, AZ
I may not entirely understand your question, but is this what you're looking for?

Eric


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 31, 2005 5:05 pm 
Newbie

Joined: Thu Oct 06, 2005 9:30 am
Posts: 18
Location: Canada
I am trying to run an example from a book which was mad for hibernate2.x. I am currently running hibernate 3.0. Inside the build.xm file the have defined the following code.

<!-- Teach Ant how to use Hibernate's code generation tool -->
<taskdef name="hbm2java"
classname="net.sf.hibernate.tool.hbm2java.Hbm2JavaTask"
classpathref="project.class.path"/>

<!-- Generate the java code for all mapping files in our source tree -->
<target name="codegen" depends="prepare"
description="Generate Java source from the O/R mapping files">
<hbm2java output="${source.root}">
<fileset dir="${source.root}">
<include name="**/*.hbm.xml"/>
</fileset>
</hbm2java>
</target>

which generates java source from a mapping file (*.hbm.xml)

In taskdef the have defined classname "net.sf.hibernate.tool.hbm2java.Hbm2JavaTask" and hbm2java.Hbm2JavaTask class does not exist in hibernate 3.0. I was wandereing if there is an alternate class that does the same job.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 01, 2005 3:31 am 
Regular
Regular

Joined: Thu Oct 27, 2005 8:06 am
Posts: 55
Location: München, Germany
I downloaded that alpha version of HibernateTools. Although mostly advertised for its new interactive capabilities, it also contains the traditional ant tools. The class to invoke is org.hibernate.tool.ant.HibernateToolTask


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