简体   繁体   中英

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

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM