Github action keeps failing on sonarcloud scan cause of maven project


I’m having an issue where my GitHub action keeps on failing with the following error: "
Maven project detected. You should run the goal ‘org.sonarsource.scanner.maven:sonar’ during build rather than using this GitHub Action."

I’ve tried to exclude both all of java files and also the pom.xml file to stop it from trying to analyse the java code and only to analyse the golang code.

Ideally I would like both the Java and golang to be analysed however the golang one is more important.

  • ALM used (GitHub, Bitbucket Cloud, Azure DevOps)

  • CI system used (Bitbucket Cloud, Azure DevOps, Travis CI, Circle CI
    GitHub action

  • Languages of the repository
    Java and Golang



If you’re using Maven as your build tool, you should use it as your analysis tool too. As Colin advised in your other thread, simply by adding a sonar.sources property, you can analyze both your Java and your Go code together.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.