Grails 4 IntegrationsTest cannot compile when using OpenClover

I just recently upgraded a Grails 2 plugin to Grails 4 and that gave me a weird problem that probably also applies to Grails 4 applications.

Every time I ran ./gradlew check with gradle-clover-plugin (OpenClover) enabled, then I would get compile errors (“unable to resolve class” for /grails-app/**/*.groovy) during compileIntegrationTestGroovy.

After endless trial-and-error, I realised that I had to delete the /src/main/java even though it was empty!!!

I had already copied all the content from /src/main/java to /src/main/groovy during the upgrade process, but forgot to delete the /src/main/java folder.

Published by Anders Aaberg

IT-development consultant at Nine A/S MSc. Advanced Computer Science @ University of Leeds, UK

Leave a comment

Your email address will not be published. Required fields are marked *