Tagged: Maven

Add Hibernate 3.3.2 as a dependency in your Maven POM

Recently I had to update a Maven POM to get the latest release of Hibernate (3.3.2) and if you are in this boat as well, here is what you have to do:

1) Ensure that you add the JBoss repository to your <code>repositories</code> section as the latest releases are not in the standard maven repository.

<repositories>
....
<repository>
<!-- for hibernate -->
<id>jboss</id>
<url>http://repository.jboss.org/maven2</url>
</repository>
</repositories>

2) Add the latest version of hibernate to your <code>dependencies</code> section as such

<dependencies>
...
...

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.3.2.GA</version>
</dependency>
</dependencies>

3) Do an mvn clean then compile on your project and all the appropriate dependencies will be downloaded for use in your project.

Giddyup

Advertisements