Specifying src directory cause '0 C/C++/Objective-C files were analyzed' ERROR

I am facing the issue to exclude some directories when running/scanning with Sonarscanner.

This is my project structure

When I run the Sonarscanner command with
src = .

then it works.

However, when I run the command with

src = project-spec

it doesn’t work and raise an error. I apologize for the screenshot as my copy & paste doesn’t work in my environment for now.

I also tried sonar.exclusion but it also didn’t work as well.

Am I missing anything?

Please help!

My SonarScanner command was the following :

/opt/sonar-scanner/path
-Dsonar.projectKey=project name
-Dsonar.sources=project-spec
-Dsonar.cfamily.build-wrapper-output=bw-output
-Dsonar.host.url=hostserver
-Dsonar.login=password