rkd80
rkd80

Reputation: 421

Writing/Debugging Sonar plugin with hot deploy

General question that I cannot seem to get an answer for from the SonarQube confluence page.

I am looking to write a plugin for Sonar, but am unable to effectively setup my environment in an effective manner. I am able to connect a debugger to a Sonar server instance (by enabling the debug line in the wrapper config file) and I am able to hit breakpoints as the plugin is accessed from the Sonar UI, but....

  1. I can't seem to hook up a debugger during the analysis portion of the plugin. That is, when running sonar-runner on a project.
  2. I can't seem to figure out how to hot deploy the plugin. We should not have to build a deployable jar and move it over to sonar/plugins every time.
  3. Seems I would need to ideally run Sonar out of Eclipse and emulate the sonar-runner.

If anyone has resources that talk about configuring this, that would be great. The official website is a bit sparse.

Thanks

Upvotes: 2

Views: 1503

Answers (1)

You can also remotely debug part of your Sonar plugin running on batch side if you execute sonar-runner with the following java options -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 but indeed there is no way to do hot deployment.

Upvotes: 3

Related Questions