SonarQube version <-> SonarJava version <-> Custom Plugin

465 views Asked by At

I'm trying to implement a custom SonarQube plugin which also works fine on my dev machine in Eclipse, but as soon as I deploy it to our SonarQube instance it crashes during runtime with a ClassNotFoundException. The class which it can't find during runtime is ExpressionsHelper, which (as far as I understand it) should be in the sonar-java-plugin-***.jar.

Our SonarQube instance is running version 6.1, the SonarJava plugin is installed in version 4.15.0.12310.

Now to which version(s) should I set which property in my pom.xml so that the configuration on my dev machine matches the available libraries on the SonarQube instances? I've tried setting them to sonar.version=6.1, java.plugin.version=4.15.0.12310 but then I still got the ClassNotFoundException during the scan.

Thanks for your help in advance.

1

There are 1 answers

2
benzonico On

If the class is not part of package starting with : org.sonar.plugins.java.api it won't be found at runtime.

org.sonar.java.checks.helpers.ExpressionHelper is not part of this package and so won't be found at runtime, hence the exception you encounter.