Set quality profiles/gate for project created from Maven task

874 views
Skip to first unread message

Sander van Beek

unread,
Apr 7, 2017, 9:36:47 AM4/7/17
to SonarQube
Good day all,

I'm wondering if its possible to set the quality profiles and gate to be used when running Sonar from Mavan task. Documentation doesn't provide any clues so far.
Currently it seems to pick the "default" profiles and gate, even when the project is a branch of another project that uses a custom profile and gate.

Reason why I'm asking is that our Sonar server has several different projects that require their own settings. For every feature branch created we'd like to run Sonar to get early feedback.

Best regards,
Sander

G. Ann Campbell

unread,
Apr 7, 2017, 10:41:27 AM4/7/17
to SonarQube
Hi Sander,


On Friday, 7 April 2017 09:36:47 UTC-4, Sander van Beek wrote:
Good day all,

I'm wondering if its possible to set the quality profiles and gate to be used when running Sonar from Mavan task. Documentation doesn't provide any clues so far.
Currently it seems to pick the "default" profiles and gate, even when the project is a branch of another project that uses a custom profile and gate.

Yup, that's how it works. :-)

For Quality Profiles, you've got three ways to use a non-default profile:
  1.  Provision the branch project before its first analysis & explicitly associate it with the desired profile (preferred)
  2. Run the first analysis, then associate the branch project with the desired profile. As I'm sure you're aware, your issues will fluctuate at the 2nd analysis
  3. Use the sonar.profile analysis property (WARNING: deprecated and "soon" to disappear) to explicitly associate the branch at analysis time with the desired profile.
For Quality Gates, see options 1 and 2. There is no 3.

Additionally, we plan to tackle robust branch support later this year, so this might end up being handled automatically in the future.


 Ann

Sander van Beek

unread,
Apr 10, 2017, 3:11:25 AM4/10/17
to SonarQube
Hi Ann,

Thanks for the reply. We'll go for the property now, looking forward to the new branch support! Is there a ticket somewhere can I can upvote? :)

Best regards,
Sander

Op vrijdag 7 april 2017 16:41:27 UTC+2 schreef G. Ann Campbell:

G. Ann Campbell

unread,
Apr 10, 2017, 7:26:52 AM4/10/17
to Sander van Beek, SonarQube
Hi Sander,

Not really because branch support is still in the formulation stage & not concrete enough yet to enter tickets for.


Ann



---
G. Ann CAMPBELL | SonarSource
Product Manager

De inhoud van dit emailbericht is strikt vertrouwelijk en uitsluitend bestemd om gelezen te worden door de geadresseerde. Wij verzoeken u derhalve dit bericht direct aan de geadresseerde te overhandigen. Indien deze email per vergissing door u is ontvangen verzoeken wij u contact met ons op te nemen. Iedere openbaarmaking, verspreiding of vermenigvuldiging van dit emailbericht is strikt verboden. Iedere aansprakelijkheid is beperkt tot het bedrag dat in het desbetreffende geval onder onze beroepsaansprakelijkheidsverzekering wordt uitbetaald. 

The contents of this email is strictly personal and confidential and is only intended for the use by the adressee named above. We request you tot deliver this email immediately to the adressee. If you have received this email in error, please notify us. Publication, circulation, or multiplication of this email is strictly prohibited. Any liability shall be limited to the amount which is paid under the Firm's professional Liability Policy in the matter concerned.

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/aLjY9vSpEwE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/19d4268e-a2f3-4797-a235-af0c30a71e9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages