2019 update: it drove me crazy for a few days, even with the latest versions of Eclipse and new installations (Mac, Grails 4, Gradle 5.1.1, Java 8). A few examples above led me to a solution.
My problem was that the code I tested included a mixture of groovy and java src / main code. He gave me NoClassDefFound for .groovy classes when I launched my Spec as JUnit.
Solution: I had to reconfigure Run / Debug to enable the / classes / groovy / main assembly. Then it worked. Itβs a little pain to remember this for every new Configuration, but it makes me move on. I hope this helps you.
kcostilow
source share