Gradle Sonarqube Failure: Execution failed for task ':compileJava' Unable to delete file


I’m using Sonarqube 9.3, using plugin 3.3, using Gradle 5.4.1.

I finally got sonarqube to run with Gradle, but I have a new error…

$ gradle sonarqube

[36]( to Gradle 5.4.1!

[37]( are the highlights of this release:

[38]( - Run builds with JDK12

[39]( - New API for Incremental Tasks

[40]( - Updates to native projects, including Swift 5 support

[41]( more details see

[42]( a Gradle Daemon (subsequent builds will be faster)

[43](> Task :compileJava FAILED

[44]( Build failed with an exception.

[45](* What went wrong:

[46]( failed for task ':compileJava'.

[47](> Unable to delete file: /<long path>/Syslog.class

Any thoughts on what account needs permission to do this? Would that be sonarqube or some other account? Do I need to create some account on the runners that would give this process permissions that it needs?


Since analysis won’t be deleting any .class files, I have to believe this error is coming from a step that happens before analysis; presumably a ‘clean’ step.

You should make sure that the use running the job has all rights, recursive, to the directory the job runs in.


use? Did you mean service?


Sorry, I meant “user”.


Ok, thanks. I sent a ticket to GitLab to see what they have to say.

1 Like