Gradle sonarqube tasks fails when any directory in the properties doesn't exist

  • Gradle 5.0, sonarqube-gradle-plugin, sonarqube 6.7.5
  • When any of the gradle config properties contains directories that don’t exist, sonarqube task fails
    Execution failed for task ‘:sonarqube’.

No files nor directories matching ‘build/resources/main’

I thought this was addressed by
But the changed significantly after 2.6.2 and it doesn’t filter directories in 2.7 versions.


If you specify missing directories in your analysis properties, analysis will fail - as a feature. We prefer fail-fast, and if the directories you’ve configured aren’t there, clearly something is wrong that you probably want to know about. Instead of continuing analysis and giving you bad results, we stop the process so you’ll take a look.