0
votes

Sonarqube Version -7.9.5

SonarQube Scanner - sonar-scanner-msbuild-5.0.4.24009-net46

Source code contains - C#, angular.js, html5, javascript.

Hi,

I executed the following commands and after executing the 3rd command I am getting execution failure error.

The command I executed in the CMD prompt are browsing to the path where solution is present are,

  1. SonarScanner.MSBuild.exe begin /k:"Demo" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="TokenID_ABC"

  2. MsBuild.exe /t:Rebuild

  3. SonarScanner.MSBuild.exe end /d:sonar.login="TokenID_ABC"

ERROR: Error during SonarScanner execution org.sonar.java.AnalysisException: Please provide compiled classes of your project with sonar.java.binaries property

enter image description here

I found one similar kind of issue reported where it is said that due to .java file present in the code the issue occurs, in our code as well .java files are present, not sure the use of them. How can I exclude those .java files while SonarQube analysis is performed and in which file do I need to add exclusion code?

Also, if there is some another solution to resolve this issue, then please let me know as I have very limited knowledge of Sonar.

Link of similar issue - https://community.sonarsource.com/t/error-while-running-sonar-scanner-please-provide-compiled-classes-of-your-project-with-sonar-java-binaries-property/30027/2

1

1 Answers

0
votes

You can exclude arbitrary files by going to your project settings in SonarQube -> Analysis Scope -> Source File Exclusions. Use regex to match your java files, i.e. *.java.