[NEW RELEASE] SVG Status plugin 1.1.0

92 views
Skip to first unread message

Michel Pawlak

unread,
Mar 1, 2016, 3:03:08 PM3/1/16
to SonarQube
Hi all,

I'm pleased to announce the release of version 1.1.0 of the SVG Status plugin for SonarQube. 

As a short reminder, the purpose of this plugin is to allow you to add an image on any website that displays the quality gate status of a project analysed on your SonarQube instance.

Release Notes:
  • Prepare plugin for addition to SonarQube's update center (see this thread, this vote-for-release step is required in order to have the plugin accepted in update center)
  • Improve installation documentation
  • Add logs during SQ startup if incomplete configuration is detected

Requirements:
  • SonarQube 4.5.4+

Link to release notes: release notes 1.1.0
Link to project page and documentation: SVG Status Plugin for SonarQube on GitHub
Link to project on Nemo: qualinsight-plugins-sonarqube-status

Thanks to G. Ann Campbell and David Racodon for their feedback !

@Ann can you please add the plugin to the update center ? Thank you in advance !

Cheers,

Michel

G. Ann Campbell

unread,
Mar 2, 2016, 4:04:49 PM3/2/16
to SonarQube
Hi Michel,

This is done, and the plugin is installed on Nemo. So here, for instance, is the plugin's own Nemo build badge url: https://nemo.sonarqube.org/api/status/image?key=com.qualinsight.plugins.sonarqube%3Aqualinsight-plugins-sonarqube-status

Use it in good health!


:-)
Ann

Michel Pawlak

unread,
Mar 3, 2016, 4:06:14 AM3/3/16
to SonarQube
Hi Ann,

Thanks for adding it to the update center and installing it on nemo ! 

After clicking on the link I realize that there might be a font-family issue. While in the code I set the font family to "DejaVu Sans,Verdana,Geneva,sans-serif" it is set to 'Dialog' in the generated SVG file. As a result, and as I do not have this font, the result is quite ugly here. I'll have to check this (minor) point. 

Cheers,

Michel

Michel Pawlak

unread,
Mar 3, 2016, 4:09:51 AM3/3/16
to SonarQube
In fact, some font-family attributes are missing in the generated SVG file. I'll try to fix it ASAP (i.e. this WE.)

Michel

Fabrice Bellingard

unread,
Mar 3, 2016, 7:40:27 AM3/3/16
to Michel Pawlak, SonarQube
Hi Michel,

thanks for this contribution, I like it :-)

Just a minor detail: unless I missed something, I don't think that "SVG" is useful in the same of the plugin (nobody cares that it's a SVG image). In fact, when reading "SVG Status Plugin" for the first time, I had no idea what the plugin was doing. Something like "Quality Gate Status Badge Plugin" would be more meaningful. 


Best regards,

Fabrice BELLINGARD | SonarSource
SonarQube Platform Product Manager
http://sonarsource.com

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/6a2b4d10-c4b3-48e2-984e-b3001f024b5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

G. Ann Campbell

unread,
Mar 3, 2016, 8:01:32 AM3/3/16
to SonarQube, michel...@gmail.com
Michel,

You compiled this with Java 8 didn't you?

We still use Java 7, and now have some failing integration tests as a result. 

Can you re-issue this compiled with Java 7, please? 

Or maybe do a point release? 


Ann
Hi Michel,

To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.

Michel Pawlak

unread,
Mar 3, 2016, 8:11:50 AM3/3/16
to SonarQube, michel...@gmail.com
Hi Ann, 

Hmm... no, it was compiled using a 1.7 JDK:


Can you please send me more information (by email if you don't want to them here) ?

Michel
Hi Michel,

To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.

G. Ann Campbell

unread,
Mar 3, 2016, 8:11:56 AM3/3/16
to SonarQube, michel...@gmail.com
Nevermind the reissue request (and sorry for the confusion!). We've excluded it from our tests. But could you compile the next version with Java 7, please? I've actually just added that to the UC requirements. Live and learn...


Ann

Michel Pawlak

unread,
Mar 3, 2016, 8:19:52 AM3/3/16
to SonarQube, michel...@gmail.com
Hi Fabrice,

Maybe the plugin deserves a better name, but I won't put "quality gate" in it. Next releases will allow to display the gate's result, but also other types of SVG images such as:

- <name your metric> -> value -> color (if gate is controlling this metric) (for instance overall coverage, or duplication)
- complex image with <name your metrics> and trend

BTW, enabling these features will be optional (as some users may not want to provide them to their users)

So if you have other ideas for a better name, do not hesitate :-) (unfortunately I do not have t-shirts to offer, but I can offer a beer instead next time we meet)

Michel

Simon Brandhof

unread,
Mar 3, 2016, 8:24:07 AM3/3/16
to SonarQube, michel...@gmail.com
Hi Michel,

I confirm that version 1.1.0 (downloaded here) does not support Java 7 :

Caused by: java.lang.IllegalStateException: Unable to register extension com.qualinsight.plugins.sonarqube.status.internal.QualityGateStatusRetriever

at org.sonar.core.platform.ComponentContainer.addExtension(ComponentContainer.java:241) ~[sonar-core-5.5-SNAPSHOT.jar:na]

at org.sonar.server.plugins.ServerExtensionInstaller.installExtension(ServerExtensionInstaller.java:100) ~[sonar-server-5.5-SNAPSHOT.jar:na]

at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:56) ~[sonar-server-5.5-SNAPSHOT.jar:na]

... 15 common frames omitted

Caused by: java.lang.UnsupportedClassVersionError: org/json/JSONException : Unsupported major.minor version 52.0

at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.7.0_80]


The problem is not the target version declared for javac but the usage of JSON classes that do not exist in Java 7.


Note that SonarQube 5.x LTS will move to Java 8, so this painful period to support Java 7 is almost finished !


Thanks

Simon

Fabrice Bellingard

unread,
Mar 3, 2016, 8:33:05 AM3/3/16
to Michel Pawlak, SonarQube
OK, thanks for unveiling the roadmap of the plugin ;-) 
So maybe simply "SonarQube [Project] Badge Plugin" would be enough? 


Best regards,

Fabrice BELLINGARD | SonarSource
SonarQube Platform Product Manager
http://sonarsource.com

Michel Pawlak

unread,
Mar 3, 2016, 8:34:44 AM3/3/16
to SonarQube, michel...@gmail.com
Hi Simon,

Thanks for the details. Indeed the culprit is (at least) the following dependency json.org:json:20150729

This highlights the fact that I should use clirr to make sure that the plugin is compatible with the target SQ api... http://www.mojohaus.org/clirr-maven-plugin/examples/specific-artifacts.html

Do you have guidelines for setting up clirr (or any other solution) ?

Michel

Michel Pawlak

unread,
Mar 3, 2016, 9:05:47 AM3/3/16
to SonarQube, michel...@gmail.com
Badge plugin sounds good. Thanks.

Michel Pawlak

unread,
Mar 3, 2016, 9:24:46 AM3/3/16
to SonarQube, michel...@gmail.com
FYI I'll use mojohaus' extra-enforcer-rules to check that all dependencies are compiled for JDK 1.7.

Simon Brandhof

unread,
Mar 3, 2016, 9:33:41 AM3/3/16
to Michel Pawlak, SonarQube

Michel Pawlak

unread,
Mar 3, 2016, 3:02:05 PM3/3/16
to SonarQube, michel...@gmail.com
Hi Ann,

I modified the json dependency in order to use a version compatible with JDK 1.7, and rereleased the plugin (version 1.1.1 ->  qualinsight-sonarqube-status-1.1.1.jar ) No other modification was made.

Can you please make the modifications on your side (update center + Nemo) ?

Thank you in advance.

Michel
Hi Michel,

To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.

G. Ann Campbell

unread,
Mar 3, 2016, 3:25:00 PM3/3/16
to Michel Pawlak, SonarQube
Thanks! Done.



---
G. Ann CAMPBELL | SonarSource
Product Owner

Fabrice Bellingard

unread,
Mar 4, 2016, 3:44:00 AM3/4/16
to Michel Pawlak, SonarQube
Michel, another feedback: did you set the <pluginTermsConditionsUrl> on purpose in the POM? For open source plugins, we never set this property because it has the following effect in the update center:

Inline image 1

This is not blocker but IMO not required too.



Best regards,

Fabrice BELLINGARD | SonarSource
SonarQube Platform Product Manager
http://sonarsource.com

On Tue, Mar 1, 2016 at 9:03 PM, Michel Pawlak <michel...@gmail.com> wrote:

--

Michel Pawlak

unread,
Mar 4, 2016, 4:06:46 AM3/4/16
to SonarQube, michel...@gmail.com
@Fabrice: Well, no. I was wondering why only my plugins require a tickbox to be ticked ^^ Thanks for providing this information.

By the way. I realized that Batik (the library used to generate SVG images) requires the machine on which Batik is executed to have access all fonts which are referenced (even if they are not embedded in resulting SVG.) As the font I'm using is not available on the machine running Nemo, the SVG output is quite ugly (it uses a virtual "Dialog" font, which in fact is a "Times" font.) 

I'd like to provide a fix soon. In order to make sure that the fonts I'll select will be available on Nemo, would it be possible for you to run a small application that would call http://docs.oracle.com/javase/7/docs/api/java/awt/GraphicsEnvironment.html#getAvailableFontFamilyNames() and save this output to a file ? (of course I'll provide the program)

Regards,

Michel

G. Ann Campbell

unread,
Mar 4, 2016, 7:25:39 AM3/4/16
to Michel Pawlak, SonarQube
@Michel, wouldn't it be better to package your desired font into the plugin? That way it works the same for everyone, regardless of which fonts are installed, where they are, or what the permissions on them are.



---
G. Ann CAMPBELL | SonarSource
Product Owner

--
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/G2lzMGeJsnE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/9049469d-7513-4b46-8ea0-ae1c5245afea%40googlegroups.com.

Michel Pawlak

unread,
Mar 4, 2016, 7:29:43 AM3/4/16
to SonarQube, michel...@gmail.com
You're right. +1

David Racodon

unread,
Mar 8, 2016, 8:58:14 AM3/8/16
to Michel Pawlak, SonarQube
And the badge just made its first appearance on MaestroDev: https://github.com/maestrodev/puppet-sonarqube

David RACODON
Freelance QA Consultant

G. Ann Campbell

unread,
Mar 8, 2016, 9:32:30 AM3/8/16
to David Racodon, Michel Pawlak, SonarQube
Also here: https://github.com/SonarSource/sonar-widget-lab

It's on my "eventually" list to add it to some of the other community plugins.



---
G. Ann CAMPBELL | SonarSource
Product Owner

Michel Pawlak

unread,
Mar 8, 2016, 9:49:25 AM3/8/16
to SonarQube, david....@gmail.com, michel...@gmail.com
Hi David, Ann,

Thanks for your feedback. I definitively have to fix the font issue... It's just ugly as it is right now :-) I'm looking for an easy way to do it using Batik's API, but if I can't find a better way I'll xslt the XML output (or just do a search replace... as a quick and dirty fix.)

@Ann I see that the link is not working correctly on sonar-widget-lab is the mistake on my side ?

By the way, @Ann can you please delete the project "https://nemo.sonarqube.org/overview?id=com.qualinsight.plugins.sonarqube%3Aqualinsight-plugins-sonarqube-badges" then rename the key of "https://nemo.sonarqube.org/overview?id=com.qualinsight.plugins.sonarqube%3Aqualinsight-plugins-sonarqube-status" from com.qualinsight.plugins.sonarqube:qualinsight-plugins-sonarqube-status to com.qualinsight.plugins.sonarqube:qualinsight-plugins-sonarqube-badges (as suggested by Fabrice, status became badges)

Thanks in advance !

Michel

G. Ann Campbell

unread,
Mar 8, 2016, 9:59:35 AM3/8/16
to Michel Pawlak, SonarQube, David Racodon
On Tue, Mar 8, 2016 at 3:49 PM, Michel Pawlak <michel...@gmail.com> wrote:
Hi David, Ann,

Thanks for your feedback. I definitively have to fix the font issue... It's just ugly as it is right now :-) I'm looking for an easy way to do it using Batik's API, but if I can't find a better way I'll xslt the XML output (or just do a search replace... as a quick and dirty fix.)

@Ann I see that the link is not working correctly on sonar-widget-lab is the mistake on my side ?

Not in the least. I didn't feel like digging far enough into GitHub markdown to figure out how to both a) pull in an image and b) link it. (Why, oh why does every single app use different markdown?!) This is one reason I haven't added the image to more repos yet. :-)

I'll get around to that eventually

 
By the way, @Ann can you please delete the project "https://nemo.sonarqube.org/overview?id=com.qualinsight.plugins.sonarqube%3Aqualinsight-plugins-sonarqube-badges" then rename the key of "https://nemo.sonarqube.org/overview?id=com.qualinsight.plugins.sonarqube%3Aqualinsight-plugins-sonarqube-status" from com.qualinsight.plugins.sonarqube:qualinsight-plugins-sonarqube-status to com.qualinsight.plugins.sonarqube:qualinsight-plugins-sonarqube-badges (as suggested by Fabrice, status became badges)

No. :-)
Instead, I deleted the new project and re-keyed the old project so that you'll keep your history.


Ann

Michel Pawlak

unread,
Mar 8, 2016, 10:03:26 AM3/8/16
to SonarQube, michel...@gmail.com, david....@gmail.com
Well you did exactly what I was asking so I'm happy with it ^^. Thanks.

Regards,

Michel

P.S. Concerning the markdown, I'll add the badge to my own repositories and check the syntax.
Reply all
Reply to author
Forward
0 new messages