Use Maven to build an eclipse WEB Project

Source: Internet
Author: User

1. First go to http: // Maven
.Apache.org/download.htmldownload Maven

2. After local decompression, configure the environment variable m2_home = Maven
Decompress directory

3. Open the command window MVN-V to check whether MVN is successfully installed.

Installing the maven2eclipse plug-in eclipse is a http://m2eclipse.sonatype.org/update/

1. MVN archetype: Create-dgroupid = mygroup-dartifactid = simple-webapp-dpackagename = com. mypackage-darchetypeartifactid = Maven
-Archetype-webapp

2. Create a Java directory in the simple-webapp/src/main/directory.

3. create COM/mypackage in the Java directory

4. switch to the simple-webapp directory on the console and execute MVN Eclipse: eclipse-dwtpversion = 1.5 to create the Eclipse project file-dwtpversion = 1.5, which indicates that the startup is a web project. If this sentence is not found, you cannot run the server in eclipse.

 

5. Import project files in eclipse

6. Add the Server Runtime Library to the libraries label in the Java build path of the Project attribute in eclipse.

7. In eclipse, right-click the project and select Maven
-> Enable dependency management

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: info-contact@alibabacloud.com 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.