Error resolving version for plugin when trying to analyze Maven project


I am trying to analyze my Maven project. I’ve downloaded SonarQube as zip, launched the server on localhost:8080.



Now in my project root I type: .\mvnw clean verify sonar:sonar -Dsonar.projectKey=my-project-name -Dsonar.login=my-login-key

An error I receive:
[ERROR] Error resolving version for plugin '.host.url=http://localhost' from the repositories [local (C:\Users\Jacky\.m2\repository), central (]: Plugin not found in any plugin repository -> [Help 1]

How to solve this issue? Thanks.


Welcome to the community!

You don’t need to add that plugin to your pom. Can you remove it and try again?

Also, you’re aware that in a production environment, the SonarQube server should run on its own host, right?



you don’t even need to configure the Sonarqube Maven plugin in your pom.
Maven will resolve it automatically when using the sonar:sonar goal and uses the latest version.

You may try this small test to see that it works without plugin config in pom =
Create a small test pom like that

<project xmlns="["](



then call mvn sonar:sonar and the Sonarqube Maven plugin will be downloaded.

From your error message it seems there’s either a syntax or a configuration error.

Try this =
delete the plugin config from pom
then call ( is default so you don’t need it)
mvn clean verify sonar:sonar -Dsonar.projectKey=my-project-name -Dsonar.login=my-login-key



Hi, I’m having the same issue. I don’t have the sonar maven plugin configured in my pom. I’m just trying to run as suggested in the documentation for running a local analysis using

mvn clean verify sonar:sonar -Dsonar.projectKey=project key -Dsonar.projectName=projectname -Dsonar.token=sonartoken

Is there something I am missing?


Hi @Derek_Jones,

Welcome to the community!

Please create a new thread will all your details, including your error message. Even better would be posting your entire analysis log.


Hi @ganncamp, thank you, I will do that. Could you please just clarify where to find the analysis log please? I can’t find anything in sonarqube\logs

Hi @Derek_Jones,

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.


Thanks, It worked for me running it on my computer