-->
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: setup: hibernate-tools
PostPosted: Tue Jan 29, 2013 9:08 pm 
Newbie

Joined: Wed Mar 28, 2012 8:31 pm
Posts: 9
Hi,

I'm setting up hibernate for an example from the book "Beginning Hibernate". It says I need
to install "hibernate-tools". The hibernate-tools website says this is part of JBoss-tools.
The JBoss website says JBoss-tools is part of JBoss Studio. I would like to install
JBoss Studio without having to use eclipse. Is this possible? If so, how?

thanks,
Matias


Top
 Profile  
 
 Post subject: Re: setup: hibernate-tools
PostPosted: Wed Jan 30, 2013 3:34 am 
Newbie

Joined: Thu Jun 24, 2010 8:24 am
Posts: 5
Hi,

"hibernate-tools" is jar you can use this jar for creating the *.htm files hibernate.cfg.xml and model etc from the database . You do not need to install JBoss Studio just download the hibernate-tools.jar and run the targets using ant.

<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib" />

<target name="default">
<hibernatetool destdir="./generated">
<classpath>
<path location="." />
<path location="./classes" />
</classpath>

running above hbm2ddl task to export database schema into ./generated/sql.ddl file. Other tasks you can use are:

hbm2java – generate POJOs
hbm2dao – generate DAOs
hbmtemplate – generate any custom code you want using templates (aka scaffolding)

<configuration configurationfile="hibernate.cfg.xml"/>
<hbm2ddl export="false" outputfilename="sql.ddl"/>
</hibernatetool>
</target>

_________________
Thanks,
Sandeep Bhardwaj


Top
 Profile  
 
 Post subject: Re: setup: hibernate-tools
PostPosted: Fri Feb 08, 2013 1:54 pm 
Newbie

Joined: Wed Mar 28, 2012 8:31 pm
Posts: 9
Hi Sandeep,

I'm still in a bit of jam about how to get started. I need to change
the following build.properties file (which came with "Beginning
Hibernate 2e" Ch3) for my environment (with example 1):

-----------------------------------------------------------------------------

# 1. Path to the hibernate install directory
hibernate.home=/hibernate/hibernate-3.5.1

# 2. Path to the hibernate-tools install directory
hibernate.tools.home=/hibernate/hibernate-tools-3.2.4

# 3. Path to hibernate-tools.jar relative to hibernate.tools.home
hibernate.tools.path=/plugins/org.hibernate.eclipse_3.2.4.GA-R200905070146-H18/lib/tools

# 4. Path to hibernate-tools hibernate libraries relative to hibernate.tools.home
hibernate.tools.lib.path=/plugins/org.hibernate.eclipse_3.2.4.GA-R200905070146-H18/lib/hibernate

# 5. Path to the SLF4J implementation JAR for the logging framework to use
slf4j.implementation.jar=/slf4j/slf4j-1.5.11/slf4j-simple-1.5.11.jar

# 6. Path to the HSQL DB install directory
hsql.home=/hsqldb/hsqldb_2.0.0

-----------------------------------------------------------------------------

I'm pretty sure I understand the contents of paths 1, 5, 6. However, I'm
unclear about the contents of paths 2, 3, and 4. Does anyone see what
these should be? I did read the book but I don't get the whole picture.

1. What should the contents these directories be?

2. And, how can I obtain these items?

3. Do I need all of them?

m.


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.