Maven - Local Repository
Table of Contents
About
A local repository is the repository of the local file system of Maven.
Articles Related
Location
Default
The default value is ${user.home}/.m2/repository/
Value | Example | Os |
---|---|---|
$HOME/.m2 | ~/.m2 | Linux/Unix/Mac OS X |
C:\Windows\System32\config\systemprofile\.m2 | Windows System account | |
%USERPROFILE%\.m2 | C:\Documents and Settings\username\.m2 | Windows |
%USERPROFILE%\.m2 | C:\Users\username\.m2 | Windows |
Configuration
The location of the local repository can be changed in the user configuration file.
<settings>
...
<localRepository>/absolute/path/to/local/repo/</localRepository>
...
</settings>
Management
Installing third party JARs
Purge
The goal dependency:purge-local-repository will suppress the dependency of the project (listed in the pom.xml) from the local repository