Deprecated sonar.scanner.keepReport

Is this property (sonar.scanner.keepReport) for the ant plugin in version still available? I rely on it to analyze our internal network issues when the scanner report fails to upload to our server.


John Bain

Hi John.

I’ve been researching the exact same thing recently and I found no signs of it being deprecated in the source code of sonarqube. I’m not sure if that’s going to change. Are you having problems with the report not being persisted?


@saskuc - Of course, the report is not being persisted because the previously unpublished sonar property sonar.scanner.keepReport is no longer available. I’ve checked. So, it must be either deprecated, or renamed. I have noticed that in the newer versions, the report dir has a different naming convention, because I purposefully added the .sonar/ path to my .gitignore file and noticed when I interrupted the build, the report path is being committed. I also monitored my builds and noted that the name is different. I just wish that they could publish the new property, or state that it is deprecated, so I can write my own and get on with it. If you can find anything, please let me know.

Thank so much for your reply.

John Bain

Hey John,

sonar.scanner.keepReport still works just fine for me against a SonarQube v8.2 server. All files stick around in the .scannerwork directory.

@John_Bain Check the options you are passing to SonarQube. I know for a fact that if you pass some options the scanner will not save (or it will cleanup, not sure really, didn’t dig that deep) the report to disk. One such example is sonar.scanner.dumpToFile…If you have this set then the reports won’t get saved even if keepReport is set. I don’t think this is documented behaviour and might even be a bug. Good luck debugging :smiley:


Thanks, Sascha! However, I’m currently not utilizing that option. In fact, @Colin, I have found that it does seem to be deprecated in my sonar ant task version, and the reports are no longer are available under the .scannerwork directory following a scan.