Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sonar cloud plugin fails on missing class

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?

  • mvn wrapper with mvn version: apache-maven-3.5.2
  • java 8
  • ubuntu 14.04
like image 395
piotrek Avatar asked Jun 24 '26 12:06

piotrek


1 Answers

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
like image 138
piotrek Avatar answered Jun 27 '26 00:06

piotrek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!