It's in your home folder but it's hidden by default. Typing the below commands in the terminal made it visible for me (only the . m2 folder that is, not all the other hidden folders).
On a Windows machine, the . m2 folder is expected to be located under ${user. home} . On Windows 7 and Vista this resolves to <root>\Users\<username> and on XP it is <root>\Documents and Settings\<username>\.
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.
To test Maven installed or not in your Mac issue command mvn -v in Terminal, it shows you installed version if already installed otherwise error.
If you have used brew to install maven, create .m2 directory and then copy settings.xml in .m2 directory.
mkdir ~/.m2
cp /usr/local/Cellar/maven32/3.2.5/libexec/conf/settings.xml ~/.m2
You may need to change the maven version in the path, mine is 3.2.5
On the top of the screen you can find the Finder. Click Go -> Go to Folder -> search ~/.m2
If it is not found, as m2
is a hidden file you need to enable visibility by typing the following command in terminal:
defaults write com.apple.finder AppleShowAllFiles YES
It's in your home folder but it's hidden by default.
Typing the below commands in the terminal made it visible for me (only the .m2
folder that is, not all the other hidden folders).
> mv ~/.m2 ~/m2
> ln -s ~/m2 ~/.m2
Source
Go to finder:
Press on keyboard CMD+shift+G . it will show u a popup like this
Enter path ~/.m2
press enter.
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