MAVEN_HOME, MVN_HOME or M2_HOME

前端 未结 8 1072
春和景丽
春和景丽 2020-12-07 18:28

What\'s the correct Maven environment variable name: MAVEN_HOME, MVN_HOME or M2_HOME?

I\'ve found some details about M

8条回答
  •  无人及你
    2020-12-07 18:58

    I stumbled over this as chocolatey sets M2_HOME. I wanted to locate settings.xml.

    The current way for settings.xml is to go to %USERPROFILE%. There, a directory .m2 is contained, where one finds settings.xml.

    Never use M2_HOME. It is unsupported since Apache Maven 3.5.0.

    Details:

    Based on problems in using M2_HOME related to different Maven versions installed and to simplify things, the usage of M2_HOME has been removed and is not supported any more MNG-5823, MNG-5836, MNG-5607.

    Important change for windows users: The usage of %HOME% has been replaced with %USERPROFILE% MNG-6001

    Source: https://maven.apache.org/docs/3.5.0/release-notes.html#overview-about-the-changes

提交回复
热议问题