Why does a .sonar folder appear on the root of the system drive?

3,033 views
Skip to first unread message

David

unread,
Apr 2, 2016, 8:18:27 PM4/2/16
to SonarQube
We are testing 5.4 with the latest sonar-runner have noticed a .sonar folder appearing on c:\ of a standalone build machine and wonder what it is, why it has appeared and how to specify an alternative location for that. 

There is a sonar.working.directory directory explicitly set within the properties file used for each analysis and also the SONAR_RUNNER_OPTS env var has: -Djava.io.tmpdir="d:\scanners\sonar\temp" so we are unsure what this folder is for and how to specify an alternative location.

We would prefer not to write to the root of the system drive, particularly given everything runs from D:\

The folder contains:

c:\.sonar>dir
 Volume in drive C has no label.
 Volume Serial Number is 6063-9036

 Directory of c:\.sonar

03/04/2016  00:45    <DIR>          .
03/04/2016  00:45    <DIR>          ..
03/04/2016  00:25    <DIR>          cache
03/04/2016  00:44    <DIR>          ws_cache
               0 File(s)              0 bytes
               4 Dir(s)   7,072,321,536 bytes free

The content of ws_cache is:

c:\.sonar\ws_cache>dir
 Volume in drive C has no label.
 Volume Serial Number is 6063-9036

 Directory of c:\.sonar\ws_cache

03/04/2016  00:44    <DIR>          .
03/04/2016  00:44    <DIR>          ..
03/04/2016  00:25    <DIR>          http%3A%2F%2F192.168.1.68%3A8080
               0 File(s)              0 bytes
               3 Dir(s)   7,072,256,000 bytes free

With thanks,

David

Scott B.

unread,
Apr 3, 2016, 9:16:16 AM4/3/16
to SonarQube, b...@hotmail.com
Hi.

This is the global cache folder. You can set with the environment variable SONAR_USER_HOME or -Duser.home=... in the SONAR_RUNNER_OPTS.

David

unread,
Apr 15, 2016, 3:50:13 AM4/15/16
to SonarQube, b...@hotmail.com
Thanks Scott, that resolved it.
Reply all
Reply to author
Forward
0 new messages