New project sonar

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • what are you trying to achieve
  • what have you tried so far to achieve this

Good afternoon! I have a question, I have a sonar project running perfectly, with each new project I need to include the project in the SonarQubeAnalysisConfig.xml file? Is there any way that this will become standard?

for example, I add a new token to the file ?, can I duplicate users

<! -
http: // localhost: 9000




alguém saberia me ajudar?


I think probably no one responded because it’s not clear what the question/problem is.


Ann, I’m sorry …
When you create a project, we set the onarQubeAnalysisConfig.xml file or the token played on sonar so that it can be recognized, would you like to know if this is some automation, or if all new projects are defined as new tokens? Could you explain me?


As far as I can tell, you’re asking whether you need to generate a new user token for the analysis of each, individual project. The answer to that should be ‘no’. Ideally, you’ll have a technical user with analysis rights on every project. You generate one token for this user, configure it on the CI side and use it for all projects.


Sorry, could not understand, criteria how to help me? Could you send me pictures if it were possible?
My idea would be for each user who has a different project, which may even be linked to the same user, but which different projects and that comes to my difficulty, how to generate projects, without placing the token in the .xml file.


I don’t know what xml file you’re talking about.


the token does not need to be configured inside the file in the sonar scanner:
File Name: sonar-scanner-msbuild- and filename: SonarQube.Analysis.xml - this file is used to place the token that is used in sonar, isn’t it? as the image below

Okay, I’m going to go back to what I said earlier:

You’ll configured the analysis token from that one, technical user in your XML file (un-commented, BTW. Your screenshot shows it commented-out) and use that for all analyses. If you really want to create a token per project, then leave it out of the .xml file, and include it instead on the analysis command line.


sorry, I did not understand very well … for example, for each project created is created this initial configuration, as follows an image below:


My question is for each project, with new users, will I need to make this new configuration with different tokens?
how could it do it in an automated way? Has as ?


I’m not sure how else to say it. Can you tell me specifically what parts of my previous response are unclear?

No. Create one “Robot” user with analysis permissions to everything.

Configure the token you generate for the “Robot” in your XML file.