• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maven doesn't take localRepository setting

 
Jacky S Zhang
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jacky S Zhang
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic