Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sonarqube 5.0 maven plugin support (deprecated maven 2)

I have tried to upgrade sonar-maven3-plugin to 5.0, when executing an analysis on the new 5.0 server. I received the following error:

[ERROR] Failed to execute goal org.codehaus.sonar:sonar-maven-plugin:5.0:sonar (default-cli) on project demo-issues: Please update sonar-maven-plugin to at least version 2.3 -> [Help 1]    
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.sonar:sonar-maven-plugin:5.0:sonar (default-cli) on project demo-issues: Please update sonar-maven-plugin to at least version 2.3    .

Looking at the release notes, it says: "[SONAR-5705] - Drop support of Maven 2". Not only drop, the Mojo directly throws an exception. The problem is that the old maven 3 plugin (the 5.0 version) still points to the maven2 one.

Is there any way to run an analysis with the 5.0 maven plugin?

like image 844
Richard Foresee Avatar asked Sep 29 '22 23:09

Richard Foresee


1 Answers

As I explained on Which sonar-maven-plugin version to use?, the plugin you have to use is org.codehaus.mojo:sonar-maven-plugin, not the internal one(s). (So no need to try to upgrade sonar-maven3-plugin)

Your issue probably comes from the fact that the version of org.codehaus.mojo:sonar-maven-plugin has been locked down in your POM or parent POM.

like image 71
Fabrice - SonarSource Team Avatar answered Oct 05 '22 06:10

Fabrice - SonarSource Team