Hands on DevOps Coaching provided using AWS & Azure Cloud. please contact Coach AK at devops.coaching@gmail.com for more info.
Sunday, February 1, 2026
Fix Found | Error No plugin found for prefix 'sonar' in the current project | Jenkins throws error when Integrating with SonarQube when using Maven goal | Fix Explained
[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)]
[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] 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.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
Jenkins Pipeline Code
stage ('Code Quality scan') {
withSonarQubeEnv('Sonar') {
sh """ ${mvnHome}/bin/mvn -f MyWebApp/pom.xml \ org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar \ -Dsonar.organization=org_key \ -Dsonar.projectKey=project_key \ -Dsonar.projectName=MyWebApp """ }
}
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.
withSonarQubeEnv('Sonar') {
}
-
Let's learn how to connect to an EC2 instance running in AWS from your local machine. Your local machine can be Windows laptop or MacBoo...
-
Amazon Elastic Container Registry (ECR) is a fully managed container registry service provided by Amazon Web Services (AWS). It allows user...
-
We get these questions a lot from the teams we are coaching at my customer's work place How to create microservices? How to break...


