Do not confuse. There are 2 different plugins.
The first is what we call "Sonar Mojo." This is what you call when you run mvn sonar:sonar . GAV of this plugin: org.codehaus.mojo:sonar-maven-plugin We recently released version 2.1 to support Maven 3.1. There is no private release of this plugin because we try to avoid any connection with the SonarQube version. When you call this plugin, it will just perform some basic checks, ask the SonarQube server about its version, and then bootstrap the “SonarQube Maven plugin”.
The "SonarQube Maven plugin" is a plugin released for each version of the SonarQube server. GAV of this plugin: org.codehaus.sonar:sonar-maven[3]-plugin . We used to have to use two different plugins (one for Maven 2, one for Maven 3). It was the work of “Sonar Mojoh Codeh” to download the correct version according to the Maven version. Starting with the SonarQube 3.7 server, there is only one plugin: org.codehaus.sonar:sonar-maven-plugin . In order not to break the compatibility with the "Codehaus Sonar Mojo", which org.codehaus.sonar:sonar-maven3-plugin still needs to download when you use Maven 3+, we have added the transfer hyphenation to the same place.
As a result, this is what is expected when you start analyzing SonarQube with Maven 3+ and SonarQube 3.7 servers:
mvn sonar:sonar- Maven will download and use the latest "Codehaus Sonar Mojo", i.e.
org.codehaus.mojo:sonar-maven-plugin:2.1 - "Codehaus Sonar Mojo" will request the version of the SonarQube server and bootstrap
org.codehaus.sonar:sonar-maven3-plugin:3.7 - Maven will load pom from
org.codehaus.sonar:sonar-maven3-plugin:3.7 and see that there is a move to org.codehaus.sonar:sonar-maven-plugin:3.7 - Maven will download and use
org.codehaus.sonar:sonar-maven-plugin:3.7
After this introduction, return to your problem. The message shows that "Codehaus Sonar Mojo" cannot load org.codehaus.sonar:sonar-maven3-plugin:3.7 . First you should try Marc suggestion and try to upgrade the version of Maven in case there is a bug with support for moving (I did not see anything about this in the Maven release notes). Then you should check your Maven configuration (do you use storage manager?).
Finally, if you still have a problem, start with a clean Maven repository (backup / remove ~ / .m2 / repository), then run mvn sonar:sonar -X and fill out your question with full logs.
source share