I use bitbucketcloud pipelines to integrate with sonarcloud.
According to the sonar scan documentation and because I use maven in my java project I use as script the mvn command: “mvn -B org.jacoco:jacoco-maven-plugin:prepare-agent verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar”
That is because the sonar scan documentation (https://bitbucket.org/sonarsource/sonarcloud-scan/src/master/README.md) it says " NOTE: For projects using Maven or Gradle please execute a respective scanner directly instead of using this pipe (see examples)."
And then in the quality gate documentation (https://bitbucket.org/sonarsource/sonarcloud-quality-gate/src/master/README.md) it says:
To use this pipe you must have the SonarCloud Scan pipe earlier in the pipeline.
So in sonar scan it ask me to use mvn script if I use maven project but then quality gate ask me to use sonar scan as pipe.
How can I get the scan and quality gate both run on a maven project with bitbucket pipelines?