This is something that is not well documented on the web, though it is quite clearly in the default
settings.xml file provided with the default Maven installation.
The default repository used by Maven 2 to store the various artifacts is
<user_home>/.m2/repository. Under Windows, that translates to
C:\Documents and Settings\<user>\.m2\repository.
On my client site, the size of the user home directory is severely restricted, presumably because it is being backed up. So, how do you change this value? Easy, once you know.
You need to have a
settings.xml file, either in the
<user_home>/.m2 directory, or in the
<maven installation>/conf directory (make sure you keep a copy of the existing one). Add a new
<localRepository> tag. On my machine, it looks like that:
<settings><!-- any type of slashes works --> <localRepository>D:/mavenrepository</localRepository> </settings>
Update 06/12/2011: fixed typo in name of tag