The above is a basic dependency structure for distributed development projects, where parent is the total parent directory of the entire project structure, and other projects can depend on it for creation. The benefit of this development is ease of management and efficiency. For example, if you want to clear the cache, or Maven install project, only need to operate a parent project, the other projects will do a corresponding operation.
Here's a look at the steps to build your project:
Click New Project new--> other--> maven--> maven--> maven project.
Continue clicking next to enter the next step.
Select WebApp and click Next.
The group ID and artifact ID correspond to the domain name inversion and project engineering name respectively.
When the new is finished, follow the image above. Then build the subproject of the parent project.
Right-click on the parent item new--> Other-->maven module
Select module, click Next, and go to the next step.
It is only necessary to fill in the project name on the line, and the project will automatically depend on the parent project.
View Pom.xml found in the configuration file, the parent project's coordinate information is automatically introduced. (My parent project here is manager.) )
A simple distributed project built on a parent project is built, and a more complete project structure typically has service, DAO, and Web, which can often be managed using the manager project to manage service, DAO, and the Web, leaving the manager dependent on parent. Convenient for better management.
A very good advantage of distributed build based projects is that you can manage jars uniformly, for example, we can centrally define some common dependency jar packages in the pom file of the Paren total parent project.
In this way, you can use these jar packages as long as the child projects that inherit from the parent project are available. Without having to reconfigure it again.
When the project is started, you can start the Web project and access the Web project directly.
————————————————————————————————————
In the process of building the whole distributed project, the big problem is basically not encountered, the directory structure settings and some jar package import, many are from the previous development project experience, and some templates. A large part of it is a direct reference. The project is a SSM framework, there are many ways to build, no matter whether or not to change the way changes in a few, the fundamental still lies in the new thing, new technology to explore constantly.