Change Maven default local repository location

Let’s say apache maven is downloaded and extracted under C:\MyFiles\apache-maven-3.5.0,

Navigate to .\apache-maven\src\conf, find & edit settings.xml

Assume you want Maven to download jar and other files under c:\Jar files\Maven_repository, then add below line under <settings…> tag and save. (mention absolute path)

<localRepository>c:/Jar files/Maven_repository</localRepository>

your settings.xml somewhat looks like below


On Eclipse IDE > Windows menu > Preferences > Maven > User Settings

Provide the path of settings.xml and click on apply

On IntelliJ Idea Editor:

File > Settings > Build, Execution… > BuildTools

Short url –

Content posted is based on learning or working experience, Share the post with others if find useful, Any queries?, leave comments or discuss on our, Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: