Richard Foresee
Richard Foresee

Reputation: 63

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?

Upvotes: 5

Views: 3650

Answers (1)

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.

Upvotes: 4

Related Questions