Eclipse + MAVEN Environment configuration

Source: Internet
Author: User
Tags win32

The first step: prepare and install the following software

1. jdk1.7 or above is the best;


2. Eclipse-jee-mars-2 (individual prefers Mars version), 32-bit system ready,64-bit system ready eclipse-jee-mars-2-win32-x86_;


3. Maven


Cloud Disk Address: Link: Http:// Password: crii

4. Maven repository (. m2 file that can be downloaded from the web, but slow)

Cloud Disk Address: Link: 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:


(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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.