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


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

Provide the path of settings.xml and click on apply

Short url – bit.ly/qav-mavenrepositorypath

Content posted is based on learning or working experience, please leave comments if anything needs to be added or updated, discuss your queries on our facebook:qavalidation.com, Thanks!

Leave a Reply

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

%d bloggers like this: