1, to the official website download maven,http://maven.apache.org/download.cgi
Download the tar.gz package, rename it to Maven3, and copy it to the/usr/local directory.
2. Configure Environment variables
Run command
Vim ~/.BASHRC
Insert at end
Export Maven_home=/usr/local/maven3path=${path}:${maven_home}/bin
Tip: Insert Press the I key, exit press EXC, and enter: Wq to save and exit.
To make the environment variable effective, enter:
SOURCE ~/.BASHRC
To see if MAVEN was successfully installed, command-line input
Mvn-v
The expression succeeded:
3. Configuring Eclipse
Preference settings in Eclipse
After the configuration, basically complete.
4. New MAVEN project to test
The new project structure is as follows:
At this point, you can see that the jar package is being downloaded.
Wait a moment.
Then right-click on the project, Run As,maven build, and then fill in the parameters:
The results of the view build are as follows, indicating success:
Here, the configuration is all done.
Configure Maven under Mac and integrate into Ecclipse (Mac 10.12)