简体   繁体   中英

Local maven repository location

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?

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. .

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   

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM