Maven with sonar authentication

maven, sonarqube

Solution

This is a limitation of the PDF Report Plugin that is developed by Klicap:

http://jira.codehaus.org/browse/SONARPLUGINS-1510

If you remove this plugin, then everything should be back to normal.

Problem

I am running maven with sonar. Since I activated authentication on sonar for security purposes, since then I got the following error: ``` [ERROR] Can´t access to Sonar or project doesn't exist on Sonar instance. HTTP KO to http://localhost:9000/api/resources?resource=com.myproject.soft:soft&depth=0&format=xml java.io.IOException: Can´t access to Sonar or project doesn't exist on Sonar instance. at org.sonar.report.pdf.util.SonarAccess.getUrlAsDocument(SonarAccess.java:132) at org.sonar.report.pdf.entity.Project.initializeProject(Project.java:98) ``` according to http://docs.sonarqube.org/display/SONAR/Analyzing+with+Maven I should use the following parameters: ``` -Dsonar.login=login -Dsonar.password=password ``` Those settings are not working for me. The full command I am using is: ``` mvn install sonar:sonar -Dsonar.login=login -Dsonar.password=password ```

Original source