In windows, maven downloads everything in the C:\Documents And Settings\MyUser\.m2
folder (or C:\Users\MyUser\.m2
). There exists some way to change the folder that it uses? Specially I want to set it to download anywhere BUT in the Documents And Settings
/Users
folder.
Look at your settings.xml
in ${maven.home}/conf
or, preferrably, ${user.home}/.m2/settings.xml
(see this for details about the settings.xml
). You can add (or uncomment) the following section:
<!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ~/.m2/repository
-->
<localRepository>/path/to/local/repo</localRepository>
as suggested by the commented out section already there by default. There, you should be able to change the path to achieve what you want.