Saturday, December 27, 2025

Error No plugin found for prefix 'sonar' in the current project | Jenkins throws error when Integrating with SonarQube when using Maven goal | FIX Found

[ERROR] No plugin found for prefix 'sonar' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/var/lib/jenkins/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException

Fix:

In Jenkins: don’t use sonar:sonar in the Maven targets field. Instead, call the Sonar goal with the fully-qualified plugin (or switch to a Pipeline step).

problem command is mvn clean install sonar:sonar

Fixed Code is mvn clean install org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar

Why this happens 

sonar:sonar relies on Maven “plugin prefix resolution”, which is not always reliable in Jenkins jobs, especially with older Maven/Jenkins integration. Fully qualifying the plugin is the standard CI fix.

No comments:

Post a Comment

Error No plugin found for prefix 'sonar' in the current project | Jenkins throws error when Integrating with SonarQube when using Maven goal | FIX Found

[ERROR] No plugin found for prefix 'sonar' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.m...