After thinking, or configure Maven in your Mac.
1. Download the installation package, because the company used the version is relatively low, considering compatibility, it is recommended to use the lower version. I use 3.0.5.
: http://archive.apache.org/dist/maven/maven-3/3.0.5/binaries/
Be careful not to release the source code. In the habit of win, I choose the zip version
2. Unzip to the specified folder. Pay attention to choose that do not need any permission, or will error
Tips: To display the English path of the file, you can drag the file into the terminal, which becomes the English path.
3. Configuring environment variables in the terminal
Press the letter I into insert mode
vi. bash_profilemaven_home=/users/xiqian/downloads/apache-maven-3.0.5
Path= $PATH: $MAVEN _home/binexport maven_homeexport PATH
After the modification is complete, enter the command line mode, save and Exit (command: WQ)
Tips:vi Common Commands http://blog.sina.com.cn/s/blog_640738130100tyo5.html
Command-line mode: Modify is not allowed, but the file can be saved. (Enter command: ESC)
Insert mode: Allow insertion, allow deletion. (Enter command: letter i)
4. Make configuration effective
source. bash_profile
5. Verify that the configuration is successful in the terminal. The presence indicates that the configuration was successful.
-version
Done!
MAVEN Configuration in Mac