wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven doesn't take localRepository setting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven doesn Watch "Maven doesn New topic
Author

Maven doesn't take localRepository setting

Jacky S Zhang
Greenhorn

Joined: Jul 21, 2010
Posts: 13
Hi,

I have a very weird issue of maven. I have maven 2.2.1. Set a folder in cong\setting.xml for localRepository, but mvn install it just downloads to c:\.m2\repository. check system environment variable, MAVEN_HOME pointing to the right folder. CHeck PATH it has the maven 2.2.1\bin there. mvn -version showing the right version 2.2.1. But it just download to C:\.m2\repository ... What possibly causing this? What else should I check to identify the problem?

Thanks

Jacky
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5772
    
    7

Could you post your settings.xml? Also, exactly where is settings.xml (full path)? Do you my any chance have a second copy of maven installed somewhere? Or do you have a settings.xml file in <userhome>\.m2?

By the way, I hope that both of these are typos:
a) "cong/settings.xml" - it should be conf
b) c:\.m2\repository - the default location is <userhome>\.m2\repository (e.g. c:\users\xxx\.m2\repository in Vista/Win7, where xxx is your login id)

P.S. I home you used forward slashes (/) and not backwards slashes (\) when defining the repo location in settings.xml.


JBoss In Action
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15632
    
  15

Peter Johnson wrote:
b) c:\.m2\repository - the default location is <userhome>\.m2\repository (e.g. c:\users\xxx\.m2\repository in Vista/Win7, where xxx is your login id)

P.S. I home you used forward slashes (/) and not backwards slashes (\) when defining the repo location in settings.xml.


In other words, the default location is <userhome>/.m2/repository

Except when talking to Windows directly. And sometimes even then.


Customer surveys are for companies who didn't pay proper attention to begin with.
Jacky S Zhang
Greenhorn

Joined: Jul 21, 2010
Posts: 13
Peter Johnson wrote:Could you post your settings.xml? Also, exactly where is settings.xml (full path)? Do you my any chance have a second copy of maven installed somewhere? Or do you have a settings.xml file in <userhome>\.m2?

By the way, I hope that both of these are typos:
a) "cong/settings.xml" - it should be conf
b) c:\.m2\repository - the default location is <userhome>\.m2\repository (e.g. c:\users\xxx\.m2\repository in Vista/Win7, where xxx is your login id)

P.S. I home you used forward slashes (/) and not backwards slashes (\) when defining the repo location in settings.xml.


Yes, Peter..... I did find an setting.xml sitting in my user home\.m2. Removed and is fine... Thanks...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven doesn't take localRepository setting
 
Similar Threads
maven newbie
Maven and POM file
Unable to change the local repository settings
How to set an output directory
Change maven local repository in Sonatype plug for eclipse