Search code examples
javajunitsonarqubesonarscanner

Sonar-scanner gives an error called "Please provide compiled classes of your project with sonar.java.binaries property"


I'm getting an error called "Please provide compiled classes of your project with sonar.java.binaries property" when executing the sonar-scanner command. I have referred most of the currently available solutions within Stack overflow, git hub etc. However, none of these solutions have worked out successfully.

Additional Details:

Java Version : 13.0.2 SonarQube Version : sonarqube-8.2.0.32929 Sonar Scanner Version : sonar-scanner-cli-4.2.0.1873-windows

The sonar-scanner conf file properties are mentioned bellow.

sonar.projectKey=SampleProject1
sonar.projectName=SampleProject
sonar.projectVersion=1.0
sonar.sources=C://itpm123//SampleProject//src

Thank you very much and any suggestion will be greatly appreciated.


Solution

  • You probably need to do what the error message suggest: add a property

    sonar.java.binaries=C://itpm123//SampleProject//classes
    

    to your sonar-scanner conf file properties (the path is just a wild guess, supply the path to your actual compiled classes)