Project was never analyzed. A regular analysis is required before a branch analysis

Hello Team,

My sonarqube is * Developer Edition* Version 7.9.2, I’m trying to analyse my feature branch by using sh “mvn sonar:sonar -Dsonar.branch.name=$branchname” parameter but I receive the below error:

Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project amana: Unable to load component class org.sonar.scanner.scan.filesystem.InputComponentStore: Unable to load component interface org.sonar.scanner.scan.branch.BranchConfiguration: Project was never analyzed. A regular analysis is required before a branch analysis

Is it mandatory to remove the branch.name parameter for first analysis ? Could you please let me know the process.

Thanks in advance!

First, your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

7.9.2 → 8.9.2 → 9.0.1 (last step optional)

Regarding your actual question, I believe the requirement to analyze the main branch first went away in the 8-series. If you still experience a problem after upgrade, feel free to come back to us.

 
Ann