Sonar Scanner should honor XDG_CACHE_HOME

scanner

(Guillaume Lederrey) #1

It would be nice to have sonar scanner honor XDG_CACHE_HOME.

In our CI, most of our tools do honor it, which makes it easy to persist cache between different jobs. We can of course set SONAR_USER_HOME=${XDG_CACHE_HOME}/.sonar, but that is additional configuration that needs to be maintained on our side.

Alternatively, being able to set the cache directory from the maven plugin configuration would also be nicer. This would allow to manage the cache dir from Maven’s settings.xml instead of passing global env variable, and thus keep the configuration contained to the Maven context, without exposing it further.

version used: sonar-maven-plugin 3.5.0.1254