问题描述
为什么在Maven 3中将Maven用户特定的设置文件夹.m2称为.m2?
Why is the Maven user-specific settings folder .m2 called, well, .m2 in Maven 3?
我已经阅读了 Maven设置参考,但仍然一无所知,我可以.在这里找不到任何类似的问题.我知道M2_HOME在Maven 2中替换了MAVEN_HOME,所以我猜这是其中的一部分.
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.
推荐答案
该目录自Maven版本2.0起就存在,因此命名. .
表示Unix/Linux平台上的隐藏文件,m
表示Maven,2
表示2.0版.
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.
我想作者希望将当时的新v2.0版本与旧的1.x版本区分开来,因此他们创建了M2
名称.值得一提的是,Maven 2.0与Maven 1.x完全不兼容,而Maven 3.0与v2.0几乎完全向后兼容,并且仅在内部"进行了重大更改和改进.由于Maven 3.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.
这篇关于Maven中的.m2文件夹如何命名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!