The Easy way

Learn how to install Maven on Mac OS Following the instructions in this article

The other way

  1. Download Maven
  2. Extract it
  3. Move the apache-maven-x.x.x folder to a permanent location. For example /Users/nikolay/apache-maven-3.6.3
  4. Open your bash_profile
cd ~/
open -e .bash_profile

5. Add these two variables to the profile

export M2_HOME=/Users/nikolay/apache-maven-3.6.3
export PATH=$PATH:$M2_HOME/bin

6. Save

7. Restart the terminal

8. Test that it works

Nikolays-MBP:selenium-java nikolay$ mvn -version

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /Users/nikolay/apache-maven-3.6.3
Java version: 13.0.2, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.4", arch: "x86_64", family: "mac"

0 Shares
Tweet
Share
Share