I have a Java 7/Maven 3 project that I want to use SonarQube with. Because of Java 7, I have to use the sonar-maven-plugin 3.0.2. I'm getting a 401 error when trying to connect:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin: 3.0.2:sonar (default-cli) on project XXX: Unable to execute SonarQube: Fail to download libraries from server: Status returned by url [YYY/sonarqube/batch_bootstrap/index] is not valid: [401] -> [Help 1]
The maven plugin version is fixed in the pom.xml like this
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.0.2</version>
</plugin>
And I put the settings in the settings.xml like in the SonarQube example:
<pluginGroups>
<pluginGroup>org.sonarsource.scanner.maven</pluginGroup>
</pluginGroups>
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.host.url>YYY</sonar.host.url>
<sonar.login>MYUSER</sonar.login>
<sonar.password>MYPASSWORD</sonar.password>
</properties>
</profile>
</profiles>
The SonarQube version I'm trying to use is 5.6. What am I missing? Why do I keep getting this error? I tried an older version (4.5.6) of SonarQube that's installed locally on my machine and that worked. The credentials I entered are definitely working for the web panel and the system is configured to accept tests even from anonymous users, although the user I'm trying at the moment is an administrator. Is this really an authentication error (due to, say, misconfiguration) or is the sonar-maven-plugin 3.0.2 unable to communicate with SonarQube 5.6?