December 26, 2008 | 1 Minute Read
This post was originally posted on
my old blog.
I have been fighting a bit to set up a Maven project with JPA and Hibernate as persistence provider.
The final solution is very simple. But when you get on a wrong track at the beginning, you end up in a terrible maze...
So here the most important hint:
The JBoss repository (http://repository.jboss.org/maven2/) is quite a mess.
In the root of the repository you find directories (matching Maven GroupIds) for hibernate , hibernate-annotations and hibernate-entitymanager.
Do not use them!
They are outdated, do not provide current versions and most annoying do not declare their dependencies... so your pom will get a mess.
All dependencies should use the GroupId org.hibernate (browse into the org directory in the Maven repository).
I offer courses for modern web-development in the enterprise:
environment (Java, .NET).