Maven setup and configuration, Eclipse create Maven Project

Source: Internet
Author: User

Tip: Use maven to install the JDK first.

Download install Maven

First, download the latest version of maven,:http://maven.apache.org/download.cgi

Second, download maven to the E:\maven folder and unzip

Third, add the environment variable maven_home and modify path:

Iv. after the configuration is complete, enter mvn-v at the command line to see if the installation is successful

V. Modification of the Local warehouse

Open E:\maven\apache-maven-3.3.9\conf\ Setttings.xml below to add localrepository tags

  

Vi. Download the basic files

Enter mvn help:system on the command line to see the following instructions complete:

  

MAVEN is now ready to use. You can use the following command to create a Web project: (MVN archetype:create-dgroupid=com.demo.app-dartifactid=demo-app-darchetypeartifactid= Maven-archetype-webapp)

Next, configure the use in eclipse:

First, install the MAVEN plugin

The latest version of Eclipse is already integrated with the Maven plugin, and can be installed online or offline if it is not well integrated.

Second, configure Maven. Add the maven you just unzipped in installations, and then in the user settings, global Select the settings.xml file you just modified to see if the local repository item becomes the path you just modified. , if the configuration succeeds, the previous step is repeated without change.

  

  

The configuration is complete here.

To create a MAVEN project in eclipse:

One, select Maven Project

  

Second, choose to create a simple project, do not choose also can, is the next need to manually select

  

Enter the name of the organization and the project name, select the Java project or the Web project, click Finish to complete the creation.

  

Iv. the generated directory is as follows, where the project has not been created yet and some configuration

  

Five, the project name right--properties-project Facets, modify Java to 1.7, remove the dynamic WEB module option, click OK

  

Six, the project name right--properties-project Facets, tick the dynamic WEB module option, click the further configuration below available

  

Click below:

  

Modified to:

  

Click OK. At this point you can see that the Web project requires Meta-inf and Web-inf generated:

  

Seven, finally, check whether the project configuration is as follows, so that Web project creation is complete.

  

For a long time don't feel like Maven has forgotten almost. Now take some time to write it down for later use.

Maven setup and configuration, Eclipse create Maven Project

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.