Help

There have been numerous questions in regards to the following statement made in a few places on the Hibernate website:

Both Hibernate Annotations and Hibernate EntityManager are part of Hibernate Core as of 3.5.x...

So I wanted to clarify what is meant by that. Previously Hibernate Core, Hibernate Annotations and Hibernate EntityManager were all separate projects, meaning

  • they lived in different Subversion projects
  • they had independent release cycles (and hence independent versioning)
  • they had different Jira projects
  • they had different SubjectMatterExperts

Originally this split (initiate back in Hibernate's 3.0 days) was needed because back then Hibernate was on big source tree which needed to remain JDK 1.4 compliant. Nowadays though, with the modularization of the Hibernate (Core) build it became feasible to pull Annotations and EntityManager back into the same source project since each module can be built with different source and target JDK levels. The biggest win here from the user perspective I think is making the making of the "compatibility matrix" completely obsolete.

This does not mean that Annotations and EntityManager are part of the hibernate-core JAR file as far as the published maven repository artifacts are concerned. Hibernate is still modularized. The main reason for this is to isolate the dependences for each module. This makes it easy for users consuming Hibernate through a maven repo based dependency scheme (Maven, Ivy, Gradle, etc) to manage the transitive dependency tree.

In the distribution bundle (the archives uploaded to the SourceForge File Release System), however, the classes are all combined together into a single jar file. But this happens across all the modules (caching, etc) because that is how it was always done in these distribution bundles.

Hope that clarifies.

15 comments:
09. Feb 2010, 09:17 CET | Link
Tim Pham | tim_ph(AT)yahoo.com

That's great. I welcome the merger.

ReplyQuote
 
25. Mar 2010, 23:14 CET | Link
Jon
OK, so where is the download for Hibernate EntityManager??? Am I missing something obvious, or is it hidden somewhere? i.e. I want the package that has the javax.persistence classes in it so that I can use JPA. It seems like something needs to be done about the packaging as well. The current download is 80 MB which seems quite excessive considering hibernate3.jar is only 3 MB. There should be a download for the binaries only for those of us that don't want the sourceb.
 
27. Mar 2010, 23:42 CET | Link
john
Jon wrote on Mar 25, 2010 18:14:
OK, so where is the download for Hibernate EntityManager??? Am I missing something obvious, or is it hidden somewhere? i.e. I want the package that has the javax.persistence classes in it so that I can use JPA. It seems like something needs to be done about the packaging as well. The current download is 80 MB which seems quite excessive considering hibernate3.jar is only 3 MB. There should be a download for the binaries only for those of us that don't want the sourceb.

Yes where is it?

 
29. Mar 2010, 22:36 CET | Link
Jon wrote on Mar 25, 2010 18:14:
OK, so where is the download for Hibernate EntityManager??? Am I missing something obvious, or is it hidden somewhere? i.e. I want the package that has the javax.persistence classes in it so that I can use JPA. It seems like something needs to be done about the packaging as well. The current download is 80 MB which seems quite excessive considering hibernate3.jar is only 3 MB. There should be a download for the binaries only for those of us that don't want the sourceb.

You mean like

The JPA APIs are at http://repository.jboss.org/maven2/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.0.Final/hibernate-jpa-2.0-api-1.0.0.Final.jar

The release bundles are simply a legacy artifact. This is how Hibernate was released prior to us uploading them to the JBoss Maven repo. We decided to continue producing release bundles in that light. As shown above, if you really want just the binaries, they are already available via maven repo. The formats will not be changing.

 
31. Mar 2010, 05:14 CET | Link

Sorry, I still donĀ“t get it. I include hibernte3.jar in my lib folder and annotations are not recognized. What do I do? do I need to include more jars for annotations. Thank you. David

 
08. Apr 2010, 22:21 CET | Link

I remember reading: Hibernate Annotations bundled with Hibernate Core as of 3.5.x. So, is it bundled wiht or not? Where do I find annotations? Do do I configure things now?

 
08. May 2010, 00:53 CET | Link
Felipe Farias
I'm lost too trying to figure how makes 3.5.1 core+annotations works. After many tries, I finally found a out that works with Maven2 (pow.xml)

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

and don't forget:

    <repositories>
        <repository>
            <id>JBOSS</id>
            <name>JBoss Repository</name>
            <url>http://repository.jboss.org/maven2/</url>
        </repository>
    </repositories>


hibernate-entitymanager will download Core, annotations and JPA2 dependencies
 
05. Jun 2010, 05:11 CET | Link
Leekin
so which jars should i will use if i am want to start a project?
 
05. Jun 2010, 22:58 CET | Link

Depends on: 1) Whether you are using the release bundles we put on SourceForge or whether you use the Maven repository to grab dependencies. 2) What features do you want to use? Full-on JPA? Just annotations? Just Hibernate Core?

 
01. Sep 2010, 19:22 CET | Link
rohit kumar
For starters, in general, fail first approach works fine:

1/Start with hibernate3.jar

2/Build your code, identify missing jar's and then all as per requirement.

~rohit.
02. Sep 2010, 20:53 CET | Link

Now they're all in this (package)?

 
13. Sep 2010, 11:06 CET | Link
James

I'm trying to use Maven (via Ivy) and I need hibernate-core, hibernate-annotations and hibernate-validator. None of these modules have each other as dependencies, so what versions do I need? They don't appear to be bundled together at all.

 
16. Sep 2010, 15:27 CET | Link

Please show us a pom for hibernate-annotations that does not name the hibernate-core dependency....

 
24. Jun 2014, 12:55 CET | Link

MetaTrader 4 is one of the top forex trading platforms in the todays world. All the necessary trading tools and resources are on hand to allow traders to conduct Forex research and technical analysis, enter and exit trades and even use third-party automated Forex trading software Forex trading strategies that really work are mainly based on knowledgeable and well analyzed anticipation of traders. Since a large proportion of foreign exchange trading strategies is based on anticipation and future price projections, the market itself is described to be a futures market

 
29. Aug 2014, 06:33 CET | Link
obat kista herbal alami

I found useful information on this topic as I'm focusing on an enterprise project. Thanks a lot posting relative information and it's currently becoming easier to comprehensive this project obat asma herbal alami obat kista herbal alami

Post Comment