Reputation: 95
I'm new to SonarQube and have been attempting for the majority of the day to create a simple "Hello World" SonarQube widget to prove a widget can be created (it will be enhanced later).
I've created a maven project following the guidelines at;
http://docs.sonarqube.org/display/DEV/Build+plugin
I've also looked at the documentation here;
http://docs.sonarqube.org/display/DEV/Extending+Web+Application
However, when I build the java code and deploy to the plugins folder on the SonarQube server the service errors loading the plugin with the error;
java.lang.ClassCastException: cannot be cast to org.sonar.api.plugin
I have declared my class as the following;
public class MyPOC extends AbstractRubyTemplate implements RubyRailsWidget {
Does anyone have a working example of a sonarQube UI widget plugin - or assist in anyway. SonarQube does look like a fantastic tool - but its documentation seems to be lacking (or the API versions mixed up on the web searches)
Upvotes: 0
Views: 576
Reputation: 11
look at your pom.xml, make sure you configure correct plugin class. You can check under tag:
build --> plugins --> plugin --> configuration --> pluginclass.
Note: plugin class is class that implements org.sonar.api.Plugin
Upvotes: -1
Reputation: 96
this is a link to a sample project https://github.com/SonarSource/sonar-examples
Upvotes: 1