For code scanning sonarqube expects binary files, but my code repository does not conatin java binary files

Must-share information (formatted with Markdown):

  • which versions are you using - SonarQube Version 6.1 with JDK 8 running on Linux machine
  • Trying to code review using SonarQube
  • I have tried to exclude class files using properties sonar.exclusions.

I am getting following error -
ERROR: Caused by: Please provide compiled classes of your project with sonar.java.binaries property

Hi,

Welcome to the community!

First, 6.1 is quite old at this point. You should upgrade to the current LTS, 7.9.1, or the current version, 8.0, at your earliest convenience. Note that you’ll have to hit 6.7.6 in between.

Regarding your error, you must compile the code before you can analyze it, and then provide the location of your compiled class files to analysis (if you’re using the Scanner for Maven or the Scanner for Gradle that part will happen automatically).

 
HTH,
Ann