After completion of the SonarScanner analysis, there's some post-job running as below:
[DEBUG] 14:56:53.076 Post-jobs : Sonar Plug-in for Bitbucket Cloud
[INFO] 14:56:53.076 Executing post-job 'Sonar Plug-in for Bitbucket Cloud'
This fails when I have binary files in the PR with the below message:
diff --git a/docs/folder1/images/image.png b/docs/folder1/images/image.png
new file mode 100644
index 0000000..c73bf4c
Binary files /dev/null and b/docs/folder1/images/image.png differ
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project demo-proj: [sonar4bitbucket] Failed to parse diff: string matching regex `\z' expected but `B' found -> [Help 1]
One of the solutions is listed here. But this is not feasible and I want to skip the post-job completely. This is the content of sonar-maven-plugin plugin in my pom.xml file currently -
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.7.0.1746</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>sonar</goal>
</goals>
</execution>
</executions>
</plugin>
If the goal org.sonarsource.scanner.maven
is causing this, I would just like to disable this. Is there a way I can achieve this?