Reputation: 63
Whenever I run mvn in my project dir it always downloads the dependencies into that dir... I want it to download them into the main repo (home/.m2 )
Upvotes: 0
Views: 1271
Reputation: 682
After a quick google search : how-to-get-the-maven-local-repo.
Run mvn -X
and check on the first the line the one that start with:
[DEBUG] Using local repository at *YOUR_LOCAL_REPOSITORY*
If it is not the folder you want, you can change the value in your global settings or your user settings.
[DEBUG] Reading global settings from *YOUR_GLOBAL_SETTINGS*
[DEBUG] Reading user settings from *YOUR_USER_SETTINGS*
To change the value you have to add or update the element "localRepository" in one or both of the above settings file.
<localRepository>/path/to/local/repo/</localRepository>
Maven - Guide to Configuring Maven
Upvotes: 3