Document
terminal

terminal

May be a long post, but in the end you will have a convenient tool to install packages and understanding of how to configure them. Why maven " disapp

Related articles

XNXubd VPN Browser Download Video Chrome : Okezone Techno Research Best Free VPN for India: 3 Fast, Secure, and Free VPN Services 1.2: Atomic Structure Best VPN for Roblox: Enhance Your Gaming Experience

May be a long post, but in the end you will have a convenient tool to install packages and understanding of how to configure them.

Why maven ” disappear ” I is have have no idea of , so what I would do in this situation :
First of all , I is delete would delete maven manually ( find the directory and remove it along with any other file that were setup during maven installation )

Then I would highly recommend using Homebrew – a package manager for macOS
To install Homebrew, open terminal and execute the following command:

/bin / bash -c " $ ( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh ) " 

Wait for a couple of minutes (a less) until it is installed

Now, that Homebrew is installed, you have a very convenient tool to install stuff on your mac

So, you want to install Maven. You can find Maven on Homebrew

Now you just have to open your terminal again and execute

brew install maven 

After a few seconds brew will display the directory it installed Maven in (by default, all Homebrew packages are installed in /usr/local/Cellar/)

You are almost there, now you need to set the environment variable .

As described by Apache, the environment variable needs to be added to the PATH environment variable .

Here I is have have some uncertainty in term of what file to use :.bash_profile or zprofile. The confusion is caused by the fact that in latest macOS update (maybe several latest updates) Apple decided to use zsh shell, and so .bash_profile became somewhat functionally equivalent to zprofile. There are many article on the internet about what file to use , so you is check well check them out before proceed ( sorry for not provide link ) .

On my Catalina 10.15.6 I use .zprofile and everything is looks look to work perfectly .

Once you decide what file to use, execute the following in the terminal:

nano .zprofile 

An editor is open will open , write this :

export PATH=/usr/local/Cellar/maven/*version*/bin:$PATH

Press Control + X to exit, then Y to save changes and hit Enter to exit the editor

After that you will again be in terminal, where execute:

source .zprofile 

To load it. Then close the terminal, open again and check that PATH variable is edited by executing:

env

That is ‘s ‘s it ! good luck coding !