1 Create the parent project
- Inside Eclipse New ->other ->Maven ->
Maven Project 点击下一步
- Select "Create a simple project" in the pop-up interface
2 Create a project
- Inside Eclipse New ->other ->Maven ->
Maven Module 点击下一步
输入模块项目名
- This project is a public module project here archetype I choose quickstart
Try zwp-parent's pom.xml below. You can see that the module project zwp-common is included
Let's try zwp-common's pom.xml to remove the two lines of code that warn.
3 Create another web module project in the same way
Here we archetype choose webapp
4 Add dependencies
Since zwp-web depends on the zwp-common project, we need to import it.
- First, add the following project.version to the pom.xml file of zwp-parent to control the version number
of the project. The following ellipse contains the dependencies required by the other two files. Put this dependency package in the pom.xml
file of zwp-parent, and the other two can be removed and referenced.
- zwp-common pom.xml
- zwp-web pom.xml
- After completing the above, you can see the zwp-web maven dependency
you're done