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:
- 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. - In your hibernate-orm Git checkout, run the following on the command line:
./gradlew clean eclipse --refresh-dependencies
. Theeclipse
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. - In Eclipse, go to Window -> Preferences -> Java -> Compiler -> Building. Set
Circular dependencies
toWarning
, rather thanError
.
If there's anything else we can do to better streamline your IDE setup, please let me know!