1. Create a new MAVEN project
Open Eclipse Click File---->new----->other---->maven
Select Maven Project Click Next to go to the next step into the interface, tick the red circle as shown
Click Next to enter the next step
Fill in the contents of the red box according to your needs,
The group Id is the globally unique identifier of the project organization, which actually corresponds to the Java package structure, consistent with the directory structure in the main directory.
The Artifact Id is the unique identifier for the project, which actually corresponds to the project name, which is the project's root directory name.
Click Finish to complete the project creation. Project structure such as
At this point the project structure is incomplete and we need to change it into a marked MAVEN project.
2. Modify the Project
Right-click Project----->properties---->project Facets
For example, remove the tick in front of the dynamic WEB module and click Apply OK after the project structure such as
After getting the project then right-click the project----->properties---->project Facets, press Modify
Click the exclamation point hint (further configuration available) to enter the Web project settings
Click OK----> go to Previous page click Apply---->OK complete the project build as new structure
Delete the WebApp under Mian, then copy the WebApp below to the main directory and delete the WebApp directory below. Generate the following new directory structure
A standard MAVEN project is basically created, and the following modification of the publishing rules is done.
3. Modify Web Project Publishing rules
Right-click Project----->properties---->deployment Assembly
Click Add----->folder----> select Src-main-webapp----> Click Finish to finish, a simple MAVEN project is basically complete.
Eclipse+maven Building WBE Project (1)