This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 5823
    
    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: 16019
    
  20

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