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)