1. Create the parent project first
- New in Eclipse
Maven Project
;
- Select "Create a simple Project" in the popup screen
In this way, we created a MAVEN project as a regular template. We also need to make changes to this project. Note: The type of packaging is pom.
Because, this is a parent project, do not need to have any source code, then, we in eclipse the project under the unused directories are deleted, just leave the pom.xml
file on the line.
2. Create sub-projects
Select the newly built Parent project (Wyp.ssm.bus), and in the pop-up menu, click New Other -> Maven Module;
Use default archetype (default:GroupId: org.apache.maven.archetypes, Artifact Id: Maven-archetype-quickstart)
Write the module name that you want to create, such as: Wyp.ssm.db.pojo, such as:
Such a subproject is created, and in the file system, the subproject is built into the parent project's directory, such as:
The Pom file and project structure inside the project shows such as:
Ext.: http://ju.outofmemory.cn/entry/75620
Create MAVEN multi-module engineering in Eclipse