I can move the .netbeans
directory from my user directory but I cannot find how to move the .m2
directory.
Changing Netbeans'user home worked on 7.0.1, but now I upgraded to 7.1.1 and the same configuration changes as before aren't cutting it.
Is there some special way to move the .m2
folder?
If you want to create a folder with a . prefix on Windows, you can simply do this on the command line. At the command prompt type md c:\Users\Jonathan\. m2 (or equivalent for your ${user.
m2 folder is the default folder used by maven to store its: settings. xml file which specifies properties, like the central repository to download your dependencies, the location of the so-called localRepository. by default, the localRepository in which maven stores all the dependencies your project might need to run.
C:\Program Files\NetBeans 7.1.1\java\maven\conf\settings.xml
Changed localRepository in this file and it finally worked. Can't tell you how frustrating this has been.
Considering the Maven guide refers to everything (settings, repository, ...) as in "${user.home}/.../
", the official way a new user.home
for Maven.
MAVEN_OPTS=-Duser.home=/new/user/home
If it isn't working for some reason with NetBeans 7.1.1, a temporary workaround would be using a junction (Windows Xp) or a mklink
(Windows Vista or Seven) in order to redirect the .m2 directory to another path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With