Hibernate Development Environment with Eclipse and Maven

This tutorial is part of the Hibernate introduction series. This is to help setup and getting started with Hibernate. Needless to say, we need JDK. Our choice of IDE is Eclipse, build tool is Maven. You can do with Netbeans or any other editor. ANT or any other build tool is also fine.

Tools used to setup the environment:

Important part is the configuration of the needed Hibernate libraries. If you are new to Maven, go through detailed information for Maven download and setup and Maven in 10 minutes tutorial.

JDK Configuration:

Ensure that you have some version of JDK configured as below in Eclipse preferences.


Maven Configuration:

If you have setup Maven correctly, you should have preferences similar to the following


Create Maven Project

Maven is a build tool by Apache, it will help to manage the dependencies better. Now, I will create Standard Java Project, add required JARs, compile and package using Maven. All of these listed tasks are executed by Maven behind you.

Following below steps are the needed steps for creating full-fledged Java Project with all required Hibernate libraries.





Add Required Dependencies for Hibernate

For now, your Hibernate project is created but still you need to add required dependencies/libraries that Hibernate requires to work.

For getting started with Hibernate, the required libraries are:

The projects Maven pom.xml is as below,

Maven pom.xml for Hibernate and MySql dependencies

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">





With this a basic shell project is ready for Hibernate based development. In the next tutorial we will see how to configure the Hibernate properties, session and connect the database.

This Hibernate tutorial was added on 08/10/2014.

Comments on "Hibernate Development Environment with Eclipse and Maven" Tutorial:

  1. […] an example Hibernate application and you need to setup the development environment. Follow the linked tutorial to setup the project and put the following Java class file and run […]

  2. […] Setup the Hibernate development environment by referring this previous tutorial. […]

  3. Ankita says:

    Where is the src/main/resources folder

  4. Mansi says:

    Very nice description!!

  5. Nikesh Patel says:

    That’s One is Fantastic Description…
    Thanks man

Comments are closed for this "Hibernate Development Environment with Eclipse and Maven" tutorial.