0

I installed Maven 3.3 using mac's brew tool. I am not able to find the location of the .m2 folder. Please help me finding that folder.

I ran the following command to install Maven:

brew install maven@3.3

Edit:

Where is my m2 folder on Mac OS X Mavericks In the above link it is mentioned, I have to manually create .m2 folder. But, ideally it should be automatically created like in ubuntu, right?

Karol Dowbecki
  • 43,645
  • 9
  • 78
  • 111
Naanavanalla
  • 1,412
  • 2
  • 27
  • 52
  • Yes maven should automatically create .m2 folder Did u install some artifacts go mvn local repository after mvn installation ? – Bartun Jul 22 '17 at 07:38
  • Yeah, this duplicates [Where is my m2 folder on Mac OS X Mavericks](https://stackoverflow.com/questions/24496131/where-is-my-m2-folder-on-mac-os-x-mavericks). Even with the edit in this question. – cellepo Nov 07 '20 at 04:59
  • It should be automatically generated when downloading dependencies of a maven project. – dan1st Nov 07 '20 at 08:33

3 Answers3

1

if you are using ubuntu then you can find .m2 (hidden folder) folder into home directory. path : /home/username/.m2

if you are using Windows system, then .m2 folder is expected to be located under ${user.home}. On Windows 7 , 8, 10 this resolves to \Users\. So you'd normally see it under c:\Users\maven.m2. .

Anshul Sharma
  • 3,432
  • 1
  • 12
  • 17
0

Maven create automaticaly the .m2 folder :

It's in your home foldder , you didn't see it coz it's hidden by default .

you can tape those cmd tu make it visible :

> mv ~/.m2 ~/m2
> ln -s ~/m2 ~/.m2   
rnside
  • 41
  • 6
0

If used brew to install maven, create .m2 directory and then copy settings.xml in .m2 directory.

mkdir ~/.m2

cp /usr/local/Cellar/maven32/3.1.5/libexec/conf/settings.xml ~/.m2

You may need to change the maven version in the path

Community
  • 1
  • 1
Sachin Poreyana
  • 1,947
  • 15
  • 12