Now in my project root I type: .\mvnw clean verify sonar:sonar -Dsonar.projectKey=my-project-name -Dsonar.host.url=http://localhost:9000 -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 (https://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository -> [Help 1]
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
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 (sonar.host.url 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
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.