Where Is Maven Local Repository?
The maven local repository is a local folder that is used to store all your project’s dependencies (plugin jars and other files which are downloaded by Maven). In simple, when you build a Maven project, all dependency files will be stored in your Maven local repository.
By default, Maven local repository is default to
.m2
folder :- Unix/Mac OS X –
~/.m2
- Windows –
C:\Documents and Settings\{your-username}\.m2
1. Update Maven Local Repository
Normally, I will change the default local repository folder from default
.m2
to another more meaningful name, for example,maven-repo
.
Find {M2_HOME}\conf\setting.xml, update
localRepository
to something else.
{M2_HOME}\conf\setting.xml
D:/maven_repo
2. Saved it
Done, your new Maven local repository is now changed to
D:/maven_repo
.
See figure :
No comments:
Post a Comment