title: windows 7 maven 2 install
body: <p>I'm about to work through a book, "Flex on Java" and it's asked me to install maven 2+ i downloaded maven from the apache site. 
  Added :</p>
  
  <pre><code>M2_HOME = C:\apache-maven-2.2.1
  </code></pre>
  
  <p>and </p>
  
  <pre><code>M2 = %M2_HOME%\bin
  </code></pre>
  
  <p>to the environment vars according to the instructions at <a href="http://maven.apache.org/download.html" rel="nofollow noreferrer">http://maven.apache.org/download.html</a>
  then it gets to number 6 which says 
  "In the same dialog, update/create the Path environment variable in the user variables and prepend the value <code>%M2%</code> to add Maven available in the command line."</p>
  
  <p>Which environment variable should i edit and add <code>%M2%</code> to?</p>
  
  <p>After googling i found a post which says "append", not prepend to the value of <code>JAVA_HOME</code>
  I've tried prepending and appending it to the java home var but when i try to do 
  an mvn command from the command line it says its not recognised.</p>
  
  <p>Never used maven before so this is my first set up. Can anyone see what i'm not doing right or what else i need to do to be able to use the mvn command, please and thank you.</p>