Java Project is not getting analyzed in Enterprise Sonar Scanner

Template for a good bug report, formatted with Markdown:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
  1. Enterprise Edition: Version 8.5.1 (build 38104)
  2. Community Edition: Version 8.5.1 (build 38104)
  • error observed (wrap logs/code around triple quote ``` for proper formatting)
    The project can be analyzed fine in Community edition docker Sonarqube.
    The same project , In the enterprise version the error says “The main branch of this project is empty.”
    The analysis result has 0 Bugs, 0 Vulnerabilities.

Hi @sohmukhe,

Welcome to the SonarSource community!

There are many possible errors you should check for:

  • Did you scan the main branch for each scan (of each SonarQube instance)?
  • Are all your source files being included? Did you exclude too many files?
  • Are all the sonar properties matching between the SonarQube instances?
  • Did you pass extra parameters that you didn’t mean to?

In any case, can you please post the Sonar scanner debug logs for the Community Edition scan and the Enterprise Edition scan?

  • If you use Gradle, you can pass --debug as in ./gradlew clean build sonarqube --debug
  • If you use Maven, you can -X as in mvn clean install sonar:sonar -X
  • If you use SonarScanner CLI, you can run append -X as in sonar-scanner -X