title: Override M2_HOME in console doesn't work
body: <p>I have a problem with the Maven M2_HOME environment variable.</p>
  
  <p>Everytime I override the variable in console it says:</p>
  
  <pre><code>M2_HOME is set to an invalid directory.
  Please set the M2_HOME variable in your environment to match the
  location of the Maven installation
  </code></pre>
  
  <p>Here is my configuration.</p>
  
  <p>I've two maven installations, one for version 3.3.9 and one for version 3.2.5.
  I need version 3.2.5 in a while.</p>
  
  <p>So I created two additional environment variables M2_HOME_3_3_9 and M2_HOME_3_2_5 and the M2_HOME variable of course which is part of the <code>PATH</code> like <code>%M2_HOME%\bin</code>.</p>
  
  <p>By default M2_HOME is set to %M2_HOME_3_3_9%.</p>
  
  <p>If I need maven 3.2.5 I open the console and send the following command:</p>
  
  <pre><code>SET M2_HOME=%M2_HOME_3_2_5%
  </code></pre>
  
  <p>After that maven give me the error above.</p>
  
  <p>If I start the console with M2_HOME changed to %M2_HOME_3_2_5% in the environment settings everything works fine.</p>
  
  <p>With regards.</p>