Configure pom.xml for hibernate 3.6

hibernate, java, maven, pom.xml

Solution

Try `hibernate-entitymanager` instead of `hibernate-core`.

<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-entitymanager</artifactId>
    <version>3.6.3.Final</version>
</dependency>

This will include all necessary dependencies transitively. Check maven dependency hierarchy after you make this change.

BTW the lastest available version of hibernate in maven central is 4.1.18

Problem

I've tried to configure `pom.xml` file for my `Spring 3` and `Hibernate 3.6` application. The relevant part of `pom.xml` looks like this: ``` <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.9</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>3.6.3.Final</version> </dependency> <dependency> <groupId>org.javassist</groupId> <artifactId>javassist</artifactId> <version>3.17.1-GA</version> </dependency> <dependency> <groupId>asm</groupId> <artifactId>asm-all</artifactId> <version>2.2</version> </dependency> <dependency> <groupId>antlr</groupId> <artifactId>antlr</artifactId> <version>2.7.7</version> </dependency> ``` Nevertheless, if I don't include `javassist.jar` library directly to my buildpath as an `External jar`, I keep getting `java.lang.ClassNotFoundException`. Is there anything wrong in my `pom.xml`, due it doesn't download this dependency when building the project?

Original source