How to globally change the location of the maven .m2 ?
Maven uses ${user.home}/.m2 for settings, repository cache, etc.
I know that I can:
- specify a different directory for the repository cache (by changing the
localRepository attribute in my global configuration file), but not for anything else ( settings.xml , for example). - Use the
-s CLI option, but I will have to do this every time I use maven.
But ideally, I would like a global solution. Intuitively, this should be possible.
I would like to do this because my company installs my $ {user.home} on a shared drive that is prone to network problems.
maven
Roy Truelove May 16 '13 at 15:05 2013-05-16 15:05
source share