I have search a lot about this problem also here on stackoverflow, but I didn't find the solution.
Until yesterday Travis could execute sonar:sonar without any problem, but today it doesn't work and it gives me this error:
--- sonar-maven-plugin:3.7.0.1746:sonar (default-cli) @ progetto ---
[INFO] User cache: /home/travis/.sonar/cache
[INFO] SonarQube version: 8.0.0
[INFO] Default locale: "en_US", source code encoding: "UTF-8"
[INFO] Load global settings
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:38 min
[INFO] Finished at: 2019-11-08T15:56:40Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project progetto: Not authorized. Please check the properties sonar.login and sonar.password. -> [Help 1]
so I change my SONAR_TOKEN creating a new one. But nothing changed. This is my Travis file:
language: java
jdk: openjdk8
env: DISPLAY=:99.0
services:
- docker
- xvfb
addons:
sonarcloud:
organization: "laviniadd"
token:
secure: $SONAR_TOKEN
install: true
cache:
directories:
- $HOME/.m2
- $HOME/.sonar/cache
script:
- git fetch --unshallow
- mvn -f progetto/pom.xml clean verify -Pdocker -Pjacoco coveralls:report sonar:sonar
I really don't know where the problem is.
I also try to generate a new token and try to use it directly without using $SONAR_TOKEN, but nothing changed.
Thank you in advanced.
EDIT This is the full error after adding -X to my travis command :
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project progetto: Unable to load component class org.sonar.scanner.bootstrap.ScannerPluginInstaller: Unable to load component class org.sonar.scanner.bootstrap.PluginFiles: Unable to load component class org.sonar.scanner.bootstrap.GlobalConfiguration: Unable to load component class org.sonar.scanner.bootstrap.GlobalServerSettings: Not authorized. Please check the properties sonar.login and sonar.password. -> [Help 1]