By default, Homebrew will install all packages in the directory /usr/local/Cellar/, and also creates symbolic links at /usr/local/opt/ and /usr/local/bin/ (for executable files). Tested with Homebrew 2.7.2 and macOS Big Sur 11.1
This article shows how to install Maven (3.6.3) on macOS Big Sur (version 11.1). We can use Homebrew to install Maven on macOS . If Homebrew failed you or you don’t want the black-box magic, try to install the Maven manually.
This article shows how to set the $JAVA_HOME environment variable on older Mac OS X and the latest macOS 11. Steps to set the $JAVA_HOME environment variable on macOS: 1 – Find out your macOS version; 2 – Find out which shell you are using, bash or zsh? ; 3 – For zsh shell, export $JAVA_HOME at ~/.zshenv or ~/.zshrc ; 4 – For bash shell, export $JAVA_HOME at ~/.bash_profile or ~/.bashrc ; 5 – Test with echo $JAVA_HOME.