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

gradle

(D1ss0nanz) #1
  • Gradle 5.0, sonarqube-gradle-plugin 2.7.0.1622, 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 https://github.com/SonarSource/sonar-scanner-gradle/pull/40/commits/c2ccb8fd01c77bc77a7b0b8cd5aea3a5583e4ef4
But the SonarQubePlugin.java changed significantly after 2.6.2 and it doesn’t filter directories in 2.7 versions.


(G Ann Campbell) #2

Hi,

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.

 
Ann