Maven Learning Note III (Eclipse create MAVEN project)

Source: Internet
Author: User

Configuring the Eclipse Maven environment

1. Configure Manen Address

Import the downloaded Maven into it and tick the

2. Set Setting.xml Address

Select Settings.xml under the Conf directory under MAVEN, and the local Repository will automatically recognize the local Repository of the setting


Create a Maven project


Select the template (if you are creating a Web project, select Maven-archetype-webapp)


Fill in the corresponding information, then click Finish

Directory structure:

Common Java Projects

Web Project

Note: The project will appear Red Fork: Need to add servlet/jsp dependency; open pom.xml add dependencies to the dependencies tag as follows:

<dependency>

<groupId>javax.servlet</groupId>

<artifactId>jsp-api</artifactId>

<version>2.0</version>

<scope>provided</scope>

</dependency>



To create a custom project

Tick Create a simple project

After clicking Next, the template selection is skipped, and after the message is added, D click Finish.


Directory structure: A relatively complete project specification is generated

Web directories: In contrast to what we created with templates, this way creates a Web-inf file and the Web. xml file that is missing under WebApp, and we need to complete


Run


In the above build: Maven build ... After clicking, you can set up specific Maven build commands that do not require a MVN prefix, such as:






Maven Learning Note III (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.