Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How did the .m2 folder in Maven get its name?

Tags:

maven

Why is the Maven user-specific settings folder .m2 called, well, .m2 in Maven 3?

I've read through the Maven Settings Reference and am still clueless, and I can't find any similar questions here. I know M2_HOME replaced MAVEN_HOME in Maven 2, so I'm guessing that is part of the reason.

like image 452
Martin Lehmann Avatar asked Oct 10 '13 21:10

Martin Lehmann


1 Answers

The directory exists since the version 2.0 of Maven, hence the name. . means hidden files on Unix/Linux plaforms, m for Maven, 2 for version 2.0.

I guess the authors wanted to distinguish the then-new v2.0 version from the old 1.x versions, hence they created the M2 name. It's worth mentioning that Maven 2.0 was completely incompatible with Maven 1.x, while Maven 3.0 is almost fully backwards compatible with v2.0, and it only has major changes and improvements "under the hood". Since Maven 3.0 should have no visible changes from the users' perpective (to be backward compatible), the authors must not change the name of all options/directory names for the new version.

like image 113
buc Avatar answered Oct 17 '22 23:10

buc