Exclude Sonar Scan for C++ scan in a multi-language repo

We have a repo with both Java and C++ codes and we want to use Sonar scan only for the Java part.
We have in the sonar configuration included only the Java folders:
However the sonar scan failed with an error:
The Compilation Database JSON file was found but 0 C/C++/Objective-C files were analyzed
How can I proceed? Thank you.

This part of the message means that you have defined the sonar.cfamily.compile-commands property. Can you remove it?