Explain in detail how to use Maven to build a multi module project (picture and text)
Maven multi module project is applicable to some large projects. Through reasonable module splitting, code reuse is realized to facilitate maintenance and management. In particular, some open source frameworks also adopt a multi module approach to provide plug-in integration. Users can configure the specified modules as needed.
The project structure is as follows:
Create a parent Maven project
Create a new Maven project, select the storage location, and choose to create a simple Maven project
Enter group ID, artifact ID, packaging, and select POM package
Generate parent project, POM The XML is as follows
Delete SRC directory in project
Create sub module
Right click the parent project name --- new --- project, and then select Create a maven module project
Set the child project name and parent project, and then set the quick creation mode
Get the subproject (test HD API, third-party interface layer) and set the compiled JDK
Similarly, set the sub modules: Test HD Foundation (basic tool layer), test HD resource (resource layer), test HD service (logical business layer), create a new test HD modules (web layer), select to create a simple project, enter group ID, artifact ID and packaging, and select POM package for packaging
Create web sub module
The web sub module is being built in the test HD modules (web layer). Right click the test HD modules project name --- new --- project, and then select Create a maven module project. Set the sub project name and parent project, and select create new web project
To configure Maven web project, refer to [Maven] eclipse uses Maven to create Java Web project