Configure path to .scannerwork folder

Hi,

I’m wondering if there is any way to configure the path of the generated folder “.scannerwork” by the sonar scanner.

The problem is that when I want to make two scans in parallel, both scans are generating the same folder in the same path and that throws the error:

“Another SonarQube analysis is already in progress for this project”

Thanks,
Agustin

You can set -Dsonar.working.directory=some/path to override the default “.scannerwork” with “some/path”.

This deletes the folder if it already exists, not the files, the actual folder. Be careful.

@janos any clue on how to recover the folder that sonar.working.directory overwrote? Running ubuntu 18.04

@purefan The scanner doesn’t keep a backup of it before deleting. I’m afraid your only options are whatever backup solutions are provided by your environment.

Lesson learned. Thanks anyways