Unable to delete build dir after running Sonar

Viewed 206

I am using the SonarQube Gradle plugin version 3.0 with Gradle 6.7.1 for analysis of my Java code. This works fine and the results are uploaded to Sonar. When I do gradlew clean test sonarqube initially I have no problem. But when I run it subsequently I get the following:

java.io.IOException: Unable to delete directory 'C:\xxx\build'

Failed to delete some children. This might happen because a process has
files open or has its working directory set in the target directory.

- C:\xxx\build\sonar\findbugs\findsecbugs-plugin.jar
- C:\xxx\build\sonar\findbugs
- C:\xxx\build\sonar

This keep on failing until I kill the Gradle daemon after which I can successfully run sonarqube again. Is there a way to get around this?

0 Answers
Related