Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training

hibernate 3.5 maven

In this section, you will learn how to a generate simple java Hibernate 3.5 project using Maven project builder.


How to write hello world example program in Hibernate? How to create one to one relationship in Hibernate 4 with Annotation? How to calculate minimum in Hibernate using the min() Function Hibernate 4.3.4 Released: Hibernate 4.3.4.Final Maven dependency Hibernate 4.3 Hello World: Example How to create SessionFactory in Hibernate 4.3.1? Hibernate 4 Hello World: Example of Hello World program Hibernate 4 create Session Factory: Example of creating Session Factory in Hibernate 4 Hibernate 4.3 and JPA 2.1 Example What is Hibernate in Java? Hibernate Overview and Architecture What is JPA 2.1? Hibernate 4.3.0.Final Maven dependency Hibernate 4.3 ORM Features Hibernate 4.3 Tutorial Hibernate Criteria average example Hibernate Criteria load all objects from table Hibernate Criteria Hibernate beginner tutorial Hibernate Session.delete() Example Hibernate save or update method example Hibernate Load Example Hibernate save Example - Rose India Hibernate 4 tutorials Hibernate Example Step by Step in Eclipse Hibernate Configuration files Setup Hibernate Environment Hibernate Architecture Hibernate Overview Hibernate 4.2 Tutorial Hibernate 4 Annotations Tutorial Hibernate 4 AnnotationSessionFactoryBean hibernate versions hibernate jndi hibernate tomcat hibernate metamodel generator hibernate entity Seam Hibernate C3P0 Hibernate hibernate shard hibernate means temporal hibernate jsf hibernate spring j2ee hibernate spring hibernate encrypted password alias_to_entity_map hibernate temporal jsf spring hibernate hibernate by example hibernate repository hibernate sample code

hibernate 3.5 maven

In this section, you will learn how to a generate simple java Hibernate 3.5 project using Maven project builder.

You should aware of Maven and it should be installed on your system before learning the below example, If you are not aware of the Maven, please go through the below links :

For downloading and installing  Maven click here.


For creating the project inside folder workspace , execute the below command in command prompt :

C:\workspace>mvn archetype:generate
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.
Choose a number: (1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/2
4/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/42/43/44) 15: : 15


Define value for groupId: : net.roseindia
Define value for artifactId: : HibernateTutorial
Define value for version: 1.0-SNAPSHOT: :
Define value for package: : net.roseindia
Confirm properties configuration:
groupId: net.roseindia
artifactId: HibernateTutorial
version: 1.0-SNAPSHOT
package: net.roseindia
Y: : y


[INFO] -------------------------------------------------------------------------
[INFO] Using following parameters for creating OldArchetype: maven-archetype-qui
[INFO] -------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: net.roseindia
[INFO] Parameter: packageName, Value: net.roseindia
[INFO] Parameter: package, Value: net.roseindia
[INFO] Parameter: artifactId, Value: HibernateTutorial
[INFO] Parameter: basedir, Value: C:\workspace
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] ********************* End of debug info from resources from generated POM
[INFO] OldArchetype created in dir: C:\workspace\HibernateTutorial
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 minutes 47 seconds
[INFO] Finished at: Sat Apr 07 17:02:23 GMT+05:30 2012
[INFO] Final Memory: 9M/21M
[INFO] ------------------------------------------------------------------------

In workspace folder, you will see the following structure, which is auto generated :

Create folder resources , put Hibernator's XML files inside resource folder  as follows :

Inside HibernateTutorial folder, you will get pom.xml file, add support for Hibernate and MySQL. Hibernate is required dom4j, commons-logging, commons-collections and cglib as dependency library, add it as follows :

<project xmlns="" xmlns:xsi=""






<!-- MySQL database driver -->

<!-- Hibernate framework -->

<!-- Hibernate library dependecy start -->



<!-- Hibernate library dependecy end -->




Online Training Classes

Share on Google+Share on Google+

hibernate 3.5 maven

Posted on: May 11, 2012 If you enjoyed this post then why not add us on Google+? Add us to your Circles



Discuss: hibernate 3.5 maven  

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image