Configuration of the MAVEN environment variable:
First step: Download maven on MAVEN's website. http://maven.apache.org/download.cgi, I'm downloading apache-maven-3.39-bin.tar.gz here.
Step two: Unzip the downloaded tar package and unzip it to:/users/calvin/documents/tools/apache-maven-3.3.9.
Step Three: Configure the environment variables.
1. After using SU for Super Administrator, use the command CD ~ to enter the configuration environment variable directory.
2. If there is no. bash_profile file under the directory, we use the Touch command to create it. such as touch. Bash_profile. Creation Complete
After we entered into the. Bash_profile. Using the VIM command
3. After entering the. Bash_profile Configuration Environment,
Maven_home: Point to our MAVEN goal
Path: Executing the paths of our Maven binary execution files
4. Use the source command to take effect after the configuration is complete
source. bash_profile
4. We can check if the installation was successful by following the command below.
(1) Use the echo command to print the path
(2) Use the MVN-V command to query the MAVEN version
Configure MAVEN environment variable configuration under Mac