title: No valid Maven installation found. Either set the home directory in the configuration dialog or set the M2_HOME environment variable on your system
body: <p>I am using intellij and my M2 and M2_HOME are set and are in .bash_profile, however I have this error :</p>
  
  <p>No valid Maven installation found. Either set the home directory in the configuration dialog       or set the M2_HOME environment variable on your system</p>
  
  <p>any idea why it does not work with environment variable ?</p>