I'm trying to install Maven in my Mac system (MacOS: High Siera, Version: 10.13.3).
I followed all steps from this document: Installing Apache Maven
- Donloaded tar file from a link: apache-maven-3.5.2-bin.tar.gz extracted in same directory
echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
export PATH=/opt/apache-maven-3.5.2/bin:$PATH
All command executed without any error. Even tried using this also: Installation of the Maven command line tools.
But still system show an error when I try execute mvn
command:
-bash: mvn: command not found
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?
I tried solutions from following SO questions also but nothing works:
- install maven on mac
- Installing maven 3.0.4
- Maven Install on Mac OS X (I can't use brew, most upvoted solution here)