1. Download the maven bin package, decompress it, and configure it to the environment variable.
1 ), First go to the maven Official Website Download the Installation File For example Apache-maven-3.0.3-bin.tar.gz 2) Configure Environment Variables [Android (0) @ liangbingmatomacbook-pro ~] $ Cd ~ [Android (0) @ liangbingmatomacbook-pro ~] The environment variables added by $ open-E. bash_profile are as follows: Maven_home =/users/Android/apache-maven-3.0.3
Export maven_home
Export path =$ {path }:$ {maven_home}/bin Run [Android (0) @ liangbingmatomacbook-pro ~] $ Source/etc/profile: save environment variables Check whether it is successful: MVN-V. The output is as follows: Liangbingmatomacbook-Pro :~ Android $ MVN-vapache Maven 3.0.3 (r00005438; 01:31:09 + 0800) Maven 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 the Eclipse plug-in. M2eclipse Baidu 3. Start work! 1. Create a Maven project 2) import an existing Maven project and switch to the maven project directory. Execute MVN Eclipse: ecelipse then you can see a lot of dependent items downloaded and then import them as Eclipse projects !!! 3) In fact, there is a simpler method to install a my‑ese and execute the following a. Enable the maven function, preference ---- myeclipse ------- maven4eclipse B. Execute file ---- import ------ Maven projects import !!!! If the environment variables seem to have been properly configured after xcode is installed, you can directly check in the terminal: MVN-V