What\'s the correct Maven environment variable name: MAVEN_HOME, MVN_HOME or M2_HOME?
I\'ve found some details about M
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_HOMErelated to different Maven versions installed and to simplify things, the usage ofM2_HOMEhas 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