Install Apache Maven on macOS

In this tutorial, I will guide you all how to install Apache Maven on your macOS.

First, please download the latest version of Apache Maven at On macOS or Linux, we will download the bin.tar.gz file and on Windows, it is the file.

After the download is complete, unzip the download file:

Now, we will configure the environment variable to point to the Apache Maven bin directory. The purpose of doing this is that: we can use Apache Maven anywhere on our machine.

To do this, open the .bash_profile file located in the user directory. On my machine is /User/Khanh.

Install Apache Maven on macOS

and edit the contents of the PATH variable pointing to the path to the Apache Maven bin directory, mine is as follows:

Now, you can save our changes in this file.

To make our changes effective immediately, let’s reload the .bash_profile file with the following command:

To check the results, you can enter the following command:


Add Comment