wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes Unable to change the local repository settings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Unable to change the local repository settings" Watch "Unable to change the local repository settings" New topic
Author

Unable to change the local repository settings

Padma Priya
Ranch Hand

Joined: Feb 01, 2007
Posts: 113
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

Joined: Jun 24, 2003
Posts: 3274
    
    5

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).


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

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.


JBoss In Action
 
Don't get me started about those stupid light bulbs.
 
subject: Unable to change the local repository settings