Sunday, October 17, 2010

Add hibernate related dependencies to pom.xml

To be able to use Hibernate in your project you need reference to Hibernate jars. Once you have set up your Maven to access JBoss repository for Hibernate artifacts, you can add the dependencies below to your pom.xml:

We have added:
#1. Hibernate annotations.
#2. Hibernate commons annotations.
#3. Hibernate entity manager.
#4. Hibernate validator.


  
    org.hibernate
    hibernate-annotations
    3.5.7-SNAPSHOT
  

  
  
    org.hibernate
    hibernate-commons-annotations
    3.2.0.Final    
  
  
    org.hibernate
    hibernate-entitymanager
    3.6.0.CR2
  

  
  
     javax.validation
     validation-api
     1.0.0.GA
  
  
    org.hibernate
    hibernate-validator
    4.0.2.GA
  

1 comment:

  1. NOTE: I had incorrectly used hibernate-commons-annotation.jar version 3.3.0. That was a mistake from hibernate and I have corrected my example above. I used the 3.2.0.Final version of hibernate-commons-annotation.jar

    ReplyDelete

Your comments are welcome. It will help me improve my communication and content...plus it will encourage me! :-)