I am facing the below error while trying to scan the code using sonar-scanner that has java code and I am using sonarqube 9.9 version.
Also is there any special configuration to be added to either sonar-scanner or sonarqube 9.9 to be compatible to scan the repo that has java code.
Here’s the error message ERROR: Error during SonarScanner execution org.sonar.java.AnalysisException: Your project contains .java files, please provide compiled classes with sonar.java.binaries property, or exclude them from the analysis with sonar.exclusions property.
I am facing errors as mentioned below for different repositories of maven projects
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7:test (default-test) on project struts2-jasperreports-plugin:
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:4.8.0:compile (scala-compile-first) on project spark-tags_2.12: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:4.8.0:compile failed: org.apache.commons.exec.ExecuteException: Process exited with an error: 255 (Exit value: 255)
Can you please guide me about the errors I’m facing. I am not sure if it’s because of issues with the project’s code or with the scanner and to make sure the scanner has configured properly I did all possible ways using the help of documentation from SonarScanner for Maven
Yes, without plugin for some projects it’s able to build and scan.
Also I tried removing test cases from java files of test folder and for few it’s working, but we can’t remove the test cases every time is it!
So is there a way to scan the project in a smooth way?