The first step: prepare and install the following software
1. jdk1.7 or above is the best;
Official: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2. Eclipse-jee-mars-2 (individual prefers Mars version), 32-bit system ready eclipse-jee-mars-2-win32.zip,64-bit system ready eclipse-jee-mars-2-win32-x86_ 64.zip;
Official: http://www.eclipse.org/mars/
3. Maven
Official: http://maven.apache.org/download.cgi
Cloud Disk Address: Link: Http://pan.baidu.com/s/1boIAEAV Password: crii
4. Maven repository (. m2 file that can be downloaded from the web, but slow)
Cloud Disk Address: Link: http://pan.baidu.com/s/1o8sfZbs Password: q4xd
Step Two: Install (unzip)
1. Select a work disk, such as E: disk, to establish a directory Jee (here, according to its own wishes to establish a directory, I take the establishment of JEE as an example)
2. Place the compressed package in the JEE directory and unzip the
JDK root directory is E:\jee\jdk1.7
Eclipse root directory for e:\jee\eclipse,eclipse working directory is E:\jee\workspace
Maven root directory is E:\jee\maven-3.3.9
Maven Repository root directory is E:\jee\.m2
Step three: Set up
1. Set the Eclipse profile Eclipse.ini, modify the virtual machine path, and add it before-vmargs
-VM E:\jee\jdk1.7\bin\javaw.exe
2. Start eclipse, set up maven
Search for "maven" in the menu window-prefrences, open the "Installations" option to set
3. Set the MAVEN local warehouse path
Maven local Warehouse By default under C:\Users\ username \.m2, C disk space is usually very tense and needs to be moved to another disk, the steps are as follows:
(1) Modify the Setting.xml file in the Conf folder under the MAVEN root directory (E:\jee\maven-3.3.9) and add a new line:
<localRepository>E:\jee\.m2\repository</localRepository>
(2) Modifying the MAVEN configuration in eclipse
In the menu window--prefrences, open "Maven--user settings", such as:
Click the "Browse ..." button on the "User settings" setting, select the Maven profile, and then click the "Reindex" button below to update the index.
Fourth step: Create a new MAVEN project
1. Select Menu File-new-maven Project, if you have a workspace, tick the Use default Workspace location item, and don't select a workspace that belongs to you by clicking the Browse option (browse):
2. New Maven project, choose a quick Maven project
3. Set the project properties as follows
4. Click the Finish button to complete the creation
Attached: Building a web Maven project
1. In the second step of the above step, select the following project
2. A new web Maven project is found to be faulted and deleted index.jsp
3. Configuring version Information
(1) Select the current item mouse right-click---Properties---project Facets
(2) Configure the version of the three options: Web 3.0, Java 1.7 (according to your own Java version), JavaScript 1.0, after configuration discovery cannot be applied and confirmed, and there is an error
(3) Close the current window, open the folder address of your project, E:\jee\Workspaces\first-project\.settings (subject to your own project address)
Open org.eclipse.wst.common.project.facet.core.xml file, change to red font
Close the file and restart the Eclipse Discovery version to automatically configure it.
4. Add the WebApp directory to Java resources for unified management
Right-click on the item and select "Build Path" in the "Source" tab, "Add Folder", select as:
5. Maven Run Project
Choose Menu "Run"-"Run Configurations", set as:
Eclipse + MAVEN Environment configuration