Wednesday, March 7, 2012

How to Local Repository path in Eclipse for Maven



If you want to change Maven Local Repository to point to another repository than those of Eclipse pre-configured, you have to do the following steps:
1) Windows->Preferences->User settings
2) Change in the c:\yourMavenDirectory\apache-maven-2.2.1\conf\settings.xml
Locate and add the following in settings.xml

<localRepository>C:\yourmavenrepository\maven\.m2\repository</localRepository>

You can use any path. This is recommended you should not have any spaces inside your path. This may work, but to avoid any further unnecessary or unexpected errors, do rust Windows will handle it gracefully.

Then Click Apply. You can as well click Update Settings. Eclipse will read the new settings and change
the path in your Local Repository to point to the new repository.



No comments:

Post a Comment