Importing hibernate-orm Gradle project leads to compile errors

已回答

Hello,

I've been using IntelliJ for creating Hibernate ORM test cases most of the time. I've recently upgraded to 2020.3.3.

I forked the Hibernate project to my own Github account from https://github.com/hibernate/hibernate-orm and imported the project from URL, like this:

I'm now getting import errors all over the place, which did not happen before:

I'm pretty much new to IntelliJ.

How do you fix this, what was once a zero-effort import...?

Oh, see https://discourse.hibernate.org/t/how-to-contribute-using-eclipse/783/6, there's user dadler with - quote: "Importing the Gradle project into Intellij IDEA works smoothly."

Nope.

Thanks

0

Hello,

Does the project build fine from the command line outside of IntelliJ?

Please try to do:

  • File \ Invalidate caches and restart...

  • Close your project window (and IntelliJ) and remove all *.iml files and the .idea folder.

  • Delete/Rename USER_HOME/.gradle folder.

  • Re-import the project into IntelliJ from Existing sources.

If the problem remains try using the 2021.1 IDE version from https://www.jetbrains.com/idea/nextversion .

0

"File \ Invalidate caches and restart... " seems to have done the trick.

Thanks!

There are however some errors left what seems to be validation:

Since this is not a web project, it doesn't have a datasource.

How to disable this?

0

You can put the cursor on the error, press Alt + Enter and disable inspection:

0

请先登录再写评论。