Hibernate development environment setup with Maven and Eclipse

In this tutorial, we will explain, how to set up hibernate using Maven and Eclipse.

Tools & technologies used in this article:

1. Java 1.6
2. Maven 3.2.3
3. Hibernate 4.x
4. Oracle 11.2.0
5. Eclipse

1) Create Maven project in Eclipse

  • In project explorer, Right click -> choose New ->Other and Select Maven as below.




















  • Click next and next.
  • Select maven-archetype-quickstart.



















  • Enter your groupId, artifactId, version and package details.


















  • Click on Finish


2) POM.xml

How to Add Oracle JDBC Driver in Maven Local Repository

Oracle has put restriction to use oracle jdbc driver using maven repository. You need install it manually as below. Ojdbc6.jar will be added to local maven repository after executing below command.

3) Project structure

The project structure should looks like as below and make sure that hibernate and ojdbc6.jar should be added to the maven dependencies.














Posted in hibernate and tagged , .

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">