Maven local repository location
maven
local
repository
location
The maven local repository is a local folder that is used to store all your project's dependencies.
The default location is .m2
folder located in:
~/.m2
for LinuxC:\Document and Settings\{your_username}\.m2
for Windows XPC:\Users\{your_username}\.m2
for Windows 7 and up
Change the location
To change the default location you need to find the {M2_HOME}\conf\setting.xml
file and edit the localRepository
key.
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>/path/to/local/repo</localRepository>
</settings>