Compatibility between SonarQube, Plugin API and Scanner Engine artifacts

Hi,

while updating our SonarQube plugin tests, we noticed that classes such as DefaultInputFile, TestInputFileBuilder, and SensorContextTester have moved from:

org.sonarsource.sonarqube:sonar-plugin-api-impl

to Scanner Engine artifacts such as:

org.sonarsource.scanner.engine:plugin-api-scanner-impl

org.sonarsource.scanner.engine:sensor-test-fixtures

The Scanner Engine artifacts appear to have their own versioning.

For the Plugin API, there is a documented compatibility relationship with SonarQube:

However, we could not find a similar compatibility matrix in

So what is the recommended way to select compatible versions of:

  • SonarQube
  • Plugin API
  • Scanner Engine

Is there an official version mapping between the Plugin API and Scanner Engine?

Thanks!
Günter

Hello @guwirth,

Thanks for reaching out.

In general, the plugin API is backwards compatible, meaning that for the version of SonarQube and the plugin API you should pick the version that provides the necessary APIs needed by your analyzer. Furthermore, the plugin API only provides the interface. The actually implementation is provided by the SonarQube Server through the scanner-engine.

As for when you rely on either the sonar-test-fixtures or the plugin-api-scanner-impl packages for testing, you can use the version used in the corresponding SonarQube:Server that you’re already targeting with the plugin API used. The version can be found in the gradle.properties file in the scannerEngineVersion property in the SonarSource/sonarqube repository.

We’ll update the tables in the sonar-plugin-api repository to also mention the scanner-engine version to help with this in the future. Sorry for the confusion this has caused.

Best,
Sebastian Zumbrunn