Hello,
used versions:
SonarQube: 9.0.1.46107
SonarJS: 8.3.0
I would like to make some changes to the SonarSource/SonarJS-Plugin for private use [https://github.com/SonarSource/SonarJS].
Therefore I try to develop my “own” plugin based on SonarJS.
If I build the plugin and add it to $SONARQUBE/extensions/plugins the SonarQube-Server won´t load and I get the error message
java.lang.IllegalStateException: Fail to load plugin JavaScript/TypeScript Code Quality and Security [javascript]
Caused by: java.lang.IllegalStateException: Unable to register extension org.sonar.api.config.PropertyDefinition from plugin 'javascript'
Caused by: org.picocontainer.PicoCompositionException: Duplicate Keys not allowed. Duplicate for 'org.sonar.api.config.PropertyDefinition-sonar.javascript.lcov.reportPaths'
or in long:
java.lang.IllegalStateException: Fail to load plugin JavaScript/TypeScript Code Quality and Security [javascript]
at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:77)
at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:575)
at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:213)
at org.sonar.server.platform.PlatformImpl.startLevel34Containers(PlatformImpl.java:187)
at org.sonar.server.platform.PlatformImpl$1.lambda$doRun$0(PlatformImpl.java:120)
at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)
at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:120)
at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IllegalStateException: Unable to register extension org.sonar.api.config.PropertyDefinition from plugin 'javascript'
at org.sonar.core.platform.ComponentContainer.addExtension(ComponentContainer.java:243)
at org.sonar.server.plugins.ServerExtensionInstaller.installExtension(ServerExtensionInstaller.java:85)
at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:69)
... 8 common frames omitted
Caused by: org.picocontainer.PicoCompositionException: Duplicate Keys not allowed. Duplicate for 'org.sonar.api.config.PropertyDefinition-sonar.javascript.lcov.reportPaths'
at org.picocontainer.DefaultPicoContainer.addAdapterInternal(DefaultPicoContainer.java:438)
at org.picocontainer.DefaultPicoContainer.addAdapter(DefaultPicoContainer.java:459)
at org.picocontainer.DefaultPicoContainer.addComponent(DefaultPicoContainer.java:556)
at org.picocontainer.DefaultPicoContainer.access$300(DefaultPicoContainer.java:84)
at org.picocontainer.DefaultPicoContainer$AsPropertiesPicoContainer.addComponent(DefaultPicoContainer.java:1149)
at org.sonar.core.platform.ComponentContainer.addExtension(ComponentContainer.java:241)
... 10 common frames omitted
2021.09.09 19:11:54 INFO web[][o.s.p.ProcessEntryPoint] Hard stopping process
2021.09.09 19:11:54 INFO web[][o.s.s.p.d.EmbeddedDatabase] Embedded database stopped
Is there a simple way to change the SonarJS-Plugin so that this conflict is resolved?
I do not know much about maven and professional Java development therefore I am stuck here.