Help

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

3 comments:
 
08. May 2013, 16:13 CET | Link
Christian Beikov | christian.beikov(AT)gmail.com

You can use Eclipse Kepler(4.3) with Gradle STS Plugin and it works just fine. The only thing you have to do after initial import is to refresh all projects because eclipse does not gather the generated jaxb source directories during model build.

ReplyQuote
 
08. May 2013, 16:56 CET | Link

For posterity, when Brett suggests not using the Gradle integration within Eclipse he is talking about 4.2 (and earlier). Apparently that support is not great (dunno, not an Eclipse user, just a messenger). Christian is saying that the Gradle integration within Eclipse 4.3 (unstable as of this writing) is much better.

YMMV

 
21. Mar 2014, 08:44 CET | Link

For posterity, when Brett suggests not using the Gradle integration within Eclipse he is talking about 4.2 (and earlier). Apparently that support is not great (dunno, not an Eclipse user, just a messenger). Christian is saying that the Gradle integration within Eclipse 4.3 (unstable as of this writing) is much better.

Post Comment