SonarCloud Maven integration to AzureDevOps is not working

Hey, I hope you could help me here.
I’m currently evaluating this tool and planning on proposing this to our company.

The problem is I can’t make it work on our Azure devOps pipeline

The project that I’m intending to scan is maven-java
I followed these steps as stated in the tool (Service connection to sonarcloud to DevOps is already done and verified)

Add the following three tasks to your pipeline

1. Prepare Analysis Configuration

  1. Select the SonarCloud endpoint.
  2. Select the SonarCloud organization qatestorg
  3. In Choose the way to run the analysis, select Integrate with Maven or Gradle .
  4. Expand the Advanced section and replace the Additional Properties with the following snippet:


# Additional properties that will be passed to the scanner,
# Put one key=value per line, example:
# sonar.exclusions=**/*.bin
sonar.projectName=Event Report Regression Suite

Please ensure this task runs before your build step.

2. Run Code Analysis

This task needs to run after your build step.

3. Publish Quality Gate Result

This task is not mandatory but will allow you to decorate your Pull Request.

If you plan not to use such a feature, you can omit it. Be aware that this task may increase your build time

At the end of my build, I keep getting on the warning message, no analyses were found for the project. Hope to hear from someone here really soon :slight_smile:

Hey there.

The instructions in the UI tutorial are rather embarrassingly wrong (and have been reported). A better set of instructions can be found here.

You won’t use the Run Code Analysis step but in fact add the Maven task and make sure to tick the option for SonarQube/SonarCloud analysis. Setting sonar.projectKey under the Additional Properties of the Prepare step is still recommended.

Screenshot 2022-03-11 at 11.17.50