Maven Sonar Plugin integration with Maven Build Cache


We are currently using the Maven Sonar scanner plugin to perform automated scanning of our multi-module Java project. We run a single analysis from the parent project and everything works well.

In order to speed up our builds, we are also integrating the Maven build cache. However, this causes the Maven Sonar Scanner plugin to fail with this error, since there aren’t necessarily compiled classes for every module.

We are asking for the team to take a look at upgrading the Maven Sonar scanner plugin to support integration with the Maven build cache extension.

Have others experienced this issue? If so, are there clever ways to configure the Maven Sonar scanner plugin to only discover and analyze the modules which have compiled code available? Thanks!


Hi @thisdudeiknew, thanks for reaching out and suggesting this enhancement.

We’ll be working on upgrading the Maven Sonar scanner to Maven 4 soon, and we’ll also discuss the support for Maven build cache. I’ll update this thread as soon as more details are available and the MMF is defined.


Hello @thisdudeiknew,

Thanks for your message. We will see what we can do with the issue. Here is the ticket to track the progress:


1 Like

Hi, any update on this? It’s blocking our migration to maven build cache extension.