I am getting this exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7 and java.lang.NoClassDefFoundError: Coul
Got the same issue on a Maven & SpringBoot project, no Gradle whatever.
The dependency to org.codehaus.groovy is probably transitive through spring-cloud-contract-verifier. Run mvn dependency:tree
to view the whole dependency tree.
I got it fixed by upgrading the spring-cloud-contract-maven-plugin version to 2.2.3-RELEASE