Eclipse Maven Change Repository Location - Java @ Desk

Tuesday, December 30, 2014

Eclipse Maven Change Repository Location

Eclipse Maven Change Repository Location

By default, the maven repository location is "C:\Documents and Settings\USER_NAME\.m2". In order to change the default location for Maven repository, location needs to be updated with the desired location.

To change the default location follow steps :

1) Navigate to folder "C:\Documents and Settings\USER_NAME\.m2"
2) If settings.xml is not available, create the file
3) Add below code in the xml


<settings><localRepository>F:/Projects/Installers/maven</localRepository></settings>


4) Once done, go to eclipse and do a "mvn install"

The above command will download all the dependencies at the above location.

To verify, change the pom.xml and verify as shown in below image







No comments:

Post a Comment