• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to change the local repository settings

 
Padma Priya
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am using apache-maven-2.2.1. I tried changing the local repository settings(by changing the <localRepository>D:/maven_repo</localRepository>
) in settings.xml file under D:\JavaProjects\apache-maven-2.2.1\conf dir from C:\Users\deepthi\.m2 to d:\maven_repo directory.

But everytime all the dependencies are downloaded to C:\Users\deepthi\.m2 only. How can i override the default behaviour and download all my dependencies to d:\maven_repo
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Typically there are two settings files, one in the core install of Maven itself and the other one in your .m2 directory, I would edit the one in the .m2 directory (or create one there with the new directory that you want to point to).
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure that the Maven you are running is the one in D:\JavaProjects\apache-maven-2.2.1? (Martijn's recommendation will avoid this issue...)

Also, what change did you make to settings.xml?

I changed my conf/settings.xml file to relocate the repository on my PC and that works just fine for me.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic