Negative. If you don’t provision the project then the default Quality Profile will apply on first analysis. If you wish to specify a specific Quality Profile ahead of time, then the right approach is to first provision the project on SonarQube side. Note that such provisioning can also be scripted (if needed), using SonarQube WebAPI (documentation embedded in server).
We are experiencing the same issue as well. We are using the Maven Sonar scanner and since the removal / deprecation of sonar.language, this is becoming a greater issue.
Is this still the current recommendation? We do not want users having to log into SonarQube and pre-provision their projects. Likewise, executing Maven scan from a developers machine will not allow “scripting”.
Short of branching the Maven SonarScanner code and making our own custom build, I do not see a viable solution.
I am using sonar webapi to associate a project with a quality profile but not able to do it. On every run of sonnar-scanner it is associating default quality profile. Below is the code snippet.
curl -k -X POST --insecure -H “X-Auth-Token:XXX” -d ‘language=py’ -d ‘name=test_profile’ -d “project=test_1.0” https://sonartest.xxx.com/api/qualityprofiles/add_project
I am not sure what i am doing wrong. I have administrative access and followed the webapi of Version 6.7.3 (build 38370)
Also, it’s incumbent upon me to mention that the current LTS is 7.9.2, and the latest version is 8.1 (just any minute now). You should upgrade at your earliest convenience.