How to enable multiple SonarQube custom jar plugins?

Hello, We have two different SonarQube custom jar plugins set for the development and quality team. SonarQube server is not started when we add both plugins to lib/extension. Please give me the solution?

Both pom files look like

<groupId>com.example.dev</groupId>
<artifactId>dev-java-custom-rules</artifactId>
<version>1.0.0</version>
<packaging>sonar-plugin</packaging>
<name>Dev SonarQube Java Custom Rules</name>
<description>Dev Java Custom Rules for SonarQube</description>
-----------------------------
<groupId>com.example.qe</groupId>
<artifactId>qa-java-custom-rules</artifactId>
<version>1.0.0</version>
<packaging>sonar-plugin</packaging>
<name>QA SonarQube Java Custom Rules</name>
<description>QA Java Custom Rules for SonarQube</description>   

version - 9.3
Many Thanks

Hi,

What’s the error in your server logs?

 
Ann

Hi @ganncamp,
I’m getting the following error in web.log
2022.05.03 13:24:32 ERROR web[o.s.s.p.PlatformImpl] Web server startup failed: Found two versions of the plugin Java Custom Rules [javacustom] in the directory lib\extensions. Please remove one of qa-java-custom-rules-1.0.0.jar or dev-java-custom-rules-1.0.0.jar.
2022.05.03 13:24:32 INFO web[o.s.s.p.d.EmbeddedDatabase] Embedded database stopped

Hi,

At a guess, your plugin keys are coming out the same. To be sure, check the plugin jar manifests. You can differentiate the plugin keys explicitly in a sonar.pluginKey pom property.

 
HTH,
Ann

Hi @ganncamp ,

Yes, Same key I have used in both pom.xml. Thank you for the support. Issue has resloved
Thank you

1 Like