Transferred from: http://www.cnblogs.com/yqskj/archive/2013/03/30/2990292.html
1. Download Maven bin package, unzip, configure into environment variable inside
1),
First download the installation file to MAVEN website, for example, download the file as APACHE-MAVEN-3.0.3-BIN.TAR.GZ2), configure environment variables [Android (0) @liangbingmatoMacBook-pro ~]$ CD ~[ Android (0) @liangbingmatoMacBook-pro ~]$ open-e. Bash_profile Add the following environment variables: specifically, see where you unzipped. Specific Configuration Maven_home=/user/android/ apache-maven-3.0.3
Export Maven_home
Export Path=${path}:${maven_home}/bin Execute [Android (0) @liangbingmatoMacBook-pro ~]$ source/etc/profile Save environment variable Test success: Mvn-v, output is as follows liangbingmatomacbook-pro:~ android$ mvn-vapache Maven 3.0.3 (r1075438; 2011-03-01 01:31:09+0800) Mave N Home:/usr/share/mavenjava version:1.6.0_26, Vendor:apple Inc.java home:/system/library/java/javavirtualmachines/ 1.6.0.jdk/contents/homedefault Locale:en_us, platform Encoding:euc_cnos name: "Mac OS X", Version: "10.7", Arch: "x86_64 ", Family:" Mac "2, install Eclipse plug-in M2eclipse specific can Baidu 3, start working! 1. Create a new MAVEN Project 2), import an existing MAVEN project to switch to the MAVEN project directory, execute MVN eclipse:ecelipse and then you can see that downloading a lot of dependencies can be imported as an Eclipse Project!!! 3), in fact, there is an easier way to install a Myeclipese, perform the following a, open Maven function, preference----"MyEclipse-------" Maven4eclipse B, execute file----" Import------"Maven projects imported!!!! If Xcode is installed, the environment variable seems to be well-equipped and can be checked directly in the terminal: Mvn-v
Configuring the MAVEN environment for Eclipse under Mac