We have a custom rules plugin and want to find out which version of sonar-java is installed on SQ since we re-use methods from it to make our rules re-use code.
I also assume that we don’t need to include the sonar-java in our plugin. Is that true?
Looking inside the pom, you will see that both SonarQube and the Java Analyzer versions are hard-coded. This is because SonarSource’s analyzers are directly embedded in the various SonarQube versions and are shipped together. For instance, SonarQube 8.9 (previous LTS) is shipped with version 6.15.1.26025 of the Java Analyzer, while SonarQube 9.9 (LTS) is shipped with a much more recent version 7.16.0.30901 of the Java Analyzer. These versions can not be changed.