Member Menu
 
 Monthly JBoss newsletter:
 
Hibernate Books
CaveatEmptor

Building and contributing to Hibernate Tools 3.2.x

This document describes how to build the Hibernate 3.2 toolset from SVN/CVS. If you want to build other part of Hibernate such as core, Annotations, EntityManager or NHibernate, have a look at Download Overview.

At the time of writing the toolset contains the following 2 parts:

The Hibernate Tools core (available in Hibernate SVN)

  1. reverse engineering (JDBCBinder)
  2. template based artifact/code generation (ConfigurationNavigator/Exporter)
  3. ant tasks
  4. ...and more ;)

The Hibernate Tools Eclipse plugins (available in JBoss Tools SVN)

  1. eclipse query console
  2. eclipse wizard for rev.eng and artifact code generation
  3. eclipse mapping file editor
  4. ...and more ;)

Getting the source

You will as a minimum need to get the HibernateExt module from SVN.

The 3.2.x development is in the 3.2 branch at

svn co http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/HibernateExt/

See http://www.hibernate.org/6.html for details on how to access our SVN repository.

You should get Hibernate 3.2 from SVN. The two modules should have a common root directory.

The dir layout should be:

 projects/hibernate/Hibernate3
 projects/hibernate/HibernateExt

When you build Hibernate 3 core you would get something like:

 projects/hibernate/Hibernate3
 projects/hibernate/Hibernate-3.2
 projects/hibernate/HibernateExt

The source for the plugins is in JBoss Tools svn. See http://labs.jboss.com/wiki/HowToBuildJBossTools for the easiest way to setup JBoss Tools development.

Building

Some of HibernateExt modules depends on JDK 5.0 features so to build everything, you'll need a JDK 5.0 configured. Note: it is only annotations that are dependent on JDK 5.0, the rest works fine with JDK 1.4.

After that you should be able to run ../build.bat from within the HibernateExt directory. This will build everything, but you can also just build individual parts. e.g. if you want to build the tools then call ../build.bat from within the tools directory/

If you need to build Hibernate 3 then run build.bat/build.sh in the Hibernate3 directory.

Note: The reason we have a .bat/.sh pair is to circumvene the need of placing thirdparty libraries in your local Ant installation.

Run it like this:

build.bat jar copylib

After that you should have a hibernate-3.2 directory with the jar files needed.

Setting up Eclipse plugins

If you use eclipse to do your development we advise you to create a project for each module in Hibernate Tools you work on.

Contributing to Tools

The tools module is where the core of reverse engineering and artifact generation (such as hbm2java) lives. The main entry points are JDBCBinder, ConfigurationNavigator, Exporter and the .ftl files.

Look in the src/test directory for "inspiration".

Contributing to the Eclipse plugins

The org.hibernate.eclipse.* modules is for use inside Eclipse for developing the plugins. Because PDE does not know how to handle libraries that is outside its own directory structure(!), you need to manually copy the hibernate-tools.jar and other jar files you might have updated.

Note: you might need to set a hibernate.root property to the root of your Hibernate checkouts so the copy can be done correctly e.g.

..\build -f hibernate-build.xml -Dhibernate.root=/work/projects/hibernate update

Providing patches

To contribute patches put them in our JIRA


Working on Datagen

Please add comments or JIRA entries for this component: http://opensource.atlassian.com/projects/hibernate/secure/IssueNavigator.jspa?mode=hide&requestId=10410

© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]