Error resolving version for plugin when trying to analyze Maven project

Hi,

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="[http://maven.apache.org/POM/4.0.0"](http://maven.apache.org/POM/4.0.0%22)
xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance"](http://www.w3.org/2001/XMLSchema-instance%22)
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
[http://maven.apache.org/xsd/maven-4.0.0.xsd">](http://maven.apache.org/xsd/maven-4.0.0.xsd%22>)

<modelVersion>4.0.0</modelVersion>
<groupId>com.foo.bar</groupId>
<artifactId>foo-app</artifactId>
<version>1</version>

</project>

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

Gilbert

2 Likes