Reputation: 343
I recently installed Maven and I want to avoid it from downloading content into the Windows OS hard drive. I added the following line in the global settings.xml
file:
<localRepository>D:\path\to\maven\local\repository</localRepository>
And as soon as I run mvn clear
on a sample project it creates content into the %USERPROFILE%\.m2\repository
folder.
How to configure Maven for storing content at D:\path\to\maven\local\repository
only?
Upvotes: 0
Views: 76
Reputation: 9623
If you are using eclipse to build your project then eclipse comes with its own embedded Maven. Default location for the maven repository would be ~/.m2/repository
. You can change the Default maven installation to your maven installation from Preferences --> Maven --> Installations
and then add location of your maven installation.
Upvotes: 1