Sonar-scanner.properties vs sonar-project.properties

What’s the difference between the sonar-scanner.properties and sonar-project.properties files mentioned here: SonarScanner | SonarQube Docs

Does each file accept the same set of configuration options? If not, which configuration options are specific to each file?

I note that neither Test Coverage & Execution | SonarQube Docs nor Analysis Parameters | SonarQube Docs mention any *.properties file. To which file to these configuration options belong?

Hi,

Welcome to the community!

You can put the same values in both, but you probably shouldn’t. The sonar-scanner.properties file is server-level & should only hold values that are correct for all projects, such as the sonar.host.url value.

On the other hand, sonar-project.properties is a project-level file and should hold project-specific values such as the location of each project’s sonar.sources, and sonar.projectKey &etc.

 
HTH,
Ann