I have an public project on github. i try to attach sonarcloud to it:
./mvnw -X clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=xxxx-github -Dsonar.login=yyyy
project is built, tests passes and then sonar-maven-plugin:3.0.1:sonar
executes:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.1:sonar (default-cli) on project xxx: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.1:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.1:sonar: org/sonar/batch/bootstrapper/IssueListener
and at the end of the stacktrace:
Caused by: java.lang.ClassNotFoundException: org.sonar.batch.bootstrapper.IssueListener
what's missing? how to fix that?
completing @JulienL.-SonarSourceTeam advice:
changing sonar:sonar
to org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar
solved the problem
so now it is:
./mvnw -X clean org.jacoco:jacoco-maven-plugin:prepare-agent package org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=xxxx-github -Dsonar.login=yyyy