Sonar XML Custom Plugin

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • what are you trying to achieve
  • what have you tried so far to achieve this

Hi All,
I am using sonarqube-8.9.9.56886 version and trying to develop some custom xml rules on Maven platform. I am done with that added the plugin into sonarqube server. While trying to bring up the server, getting an error like the below:

2022.08.10 09:44:49 ERROR web[o.s.s.p.PlatformImpl] Web server startup failed: Found a plugin ‘XML Code Quality and Security’ in the directory ‘extensions\plugins’ with the same key [xml] as a built-in feature ‘XML Code Quality and Security’. Please remove ‘extensions\plugins\sonar-xml-plugin-2.6.0-SNAPSHOT.jar’.

Not sure how to overcome this. Can anyone please help. Thanks in advance.

Bikash

Hey there.

SonarQube does not support writing custom rules for XML in Java. You should either use xPath rule templates, or import generic issue reports.