This post is for Maven beginners. Mostly Windows is installed in C drive and hence by default Maven local repository is located at C:\Documents and Settings\userloginid\.m2.
This reduces the free space in C drive in the long run as more and more jar files [dependencies] are downloaded. Hence to specify another location we can edit settings.xml under C:\Documents and Settings\userloginid\.m2 folder as below.
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<localRepository> E:\mavenrepo </localRepository>
</settings>
Here I have specified mavenrepo folder under E drive as the Maven local repository location.
