Previously, setting up a Hibernate ORM development environment in Eclipse was a pain. Many of you have complained about circular dependencies, generated sources not added to the classpath, etc. We recently cleaned up the 'gradle eclipse' task in HHH-7617 (1). If you're interested in getting started with Hibernate contributions, here's the easiest way to do it. Note that this requires 4.2.1-SNAPSHOT, 4.3.0-SNAPSHOT, or later:

  1. I wouldn't recommend installing the Gradle Integration for Eclipse plugin. Personally, I've found it to be really buggy and not worth the effort.
  2. In your hibernate-orm Git checkout, run the following on the command line: ./gradlew clean eclipse --refresh-dependencies. The eclipse task will create the Eclipse project, including generating sources. The --refresh-dependencies tells Gradle to re-generate the dependency cache -- it isn't always necessary, but I include it for reference.
  3. In Eclipse, go to Window -> Preferences -> Java -> Compiler -> Building. Set Circular dependencies to Warning, rather than Error.

If there's anything else we can do to better streamline your IDE setup, please let me know!

1: https://hibernate.atlassian.net/browse/HHH-7617


Back to top