How can I obtain the SCM information for multiple repositories managed by repo?

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube Server Community Build 9.9.8 , Scanner 4.8.1

  • how is SonarQube deployed: zip

  • what are you trying to achieve

  • I manage multiple Git repositories using Gerrit and download multiple code repositories within a single project at once via the repo command. When I set sonar.scm.provider=git , I need to fill in sonar.projectBaseDir . After several tests, I found that this address should be the repository address with the .git directory. However, when I download the code through repo , there are many such repositories, and I have no way to specify a particular Git repository when analyzing the code. How can I solve this problem?

  • what have you tried so far to achieve this

sonar.projectKey=my_parent_project
sonar.projectName=My Parent Project
sonar.modules=module1,module2

# Configuration for module 1
module1.sonar.projectBaseDir=module1
module1.sonar.sources=src
module1.sonar.scm.provider=git  # Auto-detection or explicit specification

# Configuration for module 2
module2.sonar.projectBaseDir=module2
module2.sonar.sources=src
module2.sonar.scm.provider=git

Currently, I’m using the method of differentiating modules. However, when I execute the analysis, an error message is displayed.

分享
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Hi,

Welcome to the community!

Your version is past EOL. You should upgrade to either the latest version or the current LTA (long-term active version) at your earliest convenience. Your upgrade path is:

9.9.8 → 2025.1.1 → 2025.2 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

Regarding your question, there is no longer any support for sonar.modules. It was dropped in 2019, and deprecated long before that.

 
HTH,
Ann