title: How to ensure maven is installed in mac
body: <p>I'm trying to install <a href="https://maven.apache.org/index.html" rel="nofollow noreferrer">Maven</a> in my Mac system (MacOS: High Siera, Version: 10.13.3).</p>
  
  <p>I followed all steps from this document: <a href="https://maven.apache.org/install.html" rel="nofollow noreferrer">Installing Apache Maven</a></p>
  
  <ol>
  <li>Donloaded tar file from a link: <a href="http://www-eu.apache.org/dist/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz" rel="nofollow noreferrer">apache-maven-3.5.2-bin.tar.gz</a> extracted in same directory</li>
  <li><code>echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home</code></li>
  <li><code>export PATH=/opt/apache-maven-3.5.2/bin:$PATH</code></li>
  </ol>
  
  <p>All command executed without any error. Even tried using this also: <a href="http://www.vogella.com/tutorials/ApacheMaven/article.html" rel="nofollow noreferrer">Installation of the Maven command line tools</a>.</p>
  
  <p>But still system show an error when I try execute <code>mvn</code> command:</p>
  
  <blockquote>
    <p>-bash: mvn: command not found</p>
  </blockquote>
  
  <p><img src="https://i.stack.imgur.com/lINJx.png" alt="enter image description here"></p>
  
  <p>How can I ensure, whether maven is properly installed in my system or not? Or my question can be: How to install maven in macOS?</p>
  
  <p>I tried solutions from following SO questions also but nothing works: </p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/38295609/install-maven-on-mac">install maven on mac</a></li>
  <li><a href="https://stackoverflow.com/questions/46730375/installing-maven-3-0-4">Installing maven 3.0.4</a></li>
  <li><a href="https://stackoverflow.com/questions/8826881/maven-install-on-mac-os-x?rq=1">Maven Install on Mac OS X</a> (I can't use brew, most upvoted solution here)</li>
  </ul>