VLT-Website-Heading

Installing Apache Maven on Mac OS X

Jul 29, 2021 11:46:41 AM / by Vu Long Tran

To install Apache Maven on your Mac, that is, on a Mac OS X operating system we can download and install the latest version of Apache Maven onto your Mac.

Here is a step by step guide:

Step 1 - Download Apache Maven

Step 2 - Extract the Apache Maven file

Step 3 - Check that Apache Maven is set up

Step 1 - Download Apache Maven

Download the latest version from the Apache Maven site.

Select the "Binary zip archive" file type.

For example, apache-maven-3.8.1-bin.zip. 

apache-maven-binary-zip

Step 2 - Extract the Apache Maven file

Extract the Apache Maven bin file 

Once you download it, you can extract the bin file (i.e., unzip apache-maven-3.8.1-bin.zip file). Let's assume it has been downloaded to your Downloads folder on your Mac.

apache-maven-binary-unzip

We can extract the bin file here, and then move it to our preferred location. 

In Terminal, let's change our view to our "Downloads" folder.

cd download

Check that our Apache Maven has been downloaded and then unzip it.

ls download

apache-maven-binary-unzip0

Check that our Apache Maven is unzipped properly.

ls /opt/apache-maven

apache-maven-binary-move3

Add Apache Maven to our Environment Path

sudo mv apache-maven-3.8.1 /opt/apache-maven

apache-maven-binary-move

Step 3 - Check that Apache Maven is set up

As we have moved the core Apache Maven files to our environment path, we can check now that Apache Maven has been set up correctly. Run the following command to check: 

mvn -versionmavens-version-check

 

 

Topics: web development

Vu Long Tran

Written by Vu Long Tran

Solutions Engineer APAC. ex-@Forrester consultant. Writing on #cloud #howto guides and #tech tinkering!