I have sonarqube-10.0.0.68432, Trying to scan Android Java application via Azure Pipeline.
Projects build.gradle has necessary information
When the command fired on terminal ./gradlew sonar It scans code successfully.
Now in pipeline - All three steps are placed -
when the gradle command is added-
This gets interpreted on Azure command as “SonarQube” Parameter. while sonar expect “Sonar” as parameter. and it fails. Later when replaced everything with PowerShell command. as below .
This works but when replaced with below command, it again fails.
This task fails with below error. Can some one guess, what could be wrong and is this correct way to scan java gradle based projects ?
Note - URL mentioned in below error is live and downloads the rules file via protobuf. Project is configured for default rules. Both Azure agent and sonar server on same machine. and everything is updated to latest.
Error creating bean with name ‘org.sonarsource.scanner.api.internal.IsolatedClassloader@3dbd381b-org.sonar.scanner.report.ReportPublisher’: Unsatisfied dependency expressed through constructor parameter 7; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.sonarsource.scanner.api.internal.IsolatedClassloader@3dbd381b-org.sonar.scanner.report.ActiveRulesPublisher’: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ActiveRules’ defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method ‘provide’ threw exception; nested exception is java.lang.IllegalStateException: Fail to request url: http://10.0.0.212:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYhEtkJ-KbPFOk-Fv97_&ps=500&p=1