Enterprise Framework

Software Solutions in the Enterprise

Mac: Install Maven Command Line

Mac:  Install Maven Command Line

Download Apache Maven (MVN) from

https://maven.apache.org/download.cgi

You should download the binary (Targ.gz or zip) and not source

After you have downloaded it, unzip it by double clicking it or unzip by terminal command (example:)

$ unzip apache-maven-3.6.0-bin.zip

Open terminal if you haven't already and go to the download directory.  We'll move the expanded download file to a new location.

$ cd ~/Downloads

$ mv apache-maven-3.6.0-bin /usr/local/bin/maven

Let's add a maven/bin folder to the path

$ nano .bash_profile

Add the line and save it (control + x)

export PATH=/usr/local/bin/maven/bin:$PATH

Close terminal and reopen


Verify you can access mvn

$ mvn --version
Comments are closed