-
Error observed:
Build fails with:
[WARNING] Unable to analyse file 'pom.xml'.
java.lang.IllegalStateException: You're not authorized to run analysis. Please contact the project administrator.
Reason: One step from the step-by-step guide of integration with TravisCI is missing:
When requesting these properties to be added:
<sonar.projectKey>****</sonar.projectKey>
<sonar.organization>****</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
this one is missing:
<sonar.login>${env.SONAR_TOKEN}</sonar.login>
so even if we have created the SONAR_TOKEN in the SonarCloud context, the maven plugin can’t log in.
-
Steps to reproduce
Follow the configure page on a GitHub repository which has a language which is not supported by default. -
Potential workaround
Add this line to the properties section of the step-by-step setup guide for TravisCI integration:
<sonar.login>${env.SONAR_TOKEN}</sonar.login>
- ALM used: GitHub
- CI system used: Travis CI