In IntelliJ I get this weird error when I try to compile.
Cannot find annotation method \'cascade()\' in type \'javax.persistence.ManyToOne\': class file for
I was getting the class not found error message when trying to execute a .groovy test class, which referenced a .groovy file (located in the root of the source directory of a submodule - i.e. no packages).
Moving the source file .groovy into a package, fixed the issue for me.
Move:
src/main/groovy/RunMe.groovy
to
src/main/groovy/somePackage/RunMe.groovy