How to specify Maven local repository location


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.

 
 
 
 
Comments:

Post a Comment:
  • HTML Syntax: Allowed
 

« January 2009
SunMonTueWedThuFriSat
    
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
       
Today

Valid XHTML or CSS?

[This is a Roller site]
 
© Karthik