Create a Maven aggregation project based on eclipse

The process of building a Maven project based on eclipse is still very simple, mainly the local class library, and the setting and modification of the project setting.xml. The building steps are not described in detail. The most important thing is to build a Maven aggregation project. The specific steps are as follows:

① First create a parent template

       

② Click Next, check to build the skeleton

    

③ Continue to the next step and click Next, add your own package name and project name, and select pom for packaging.

   

④ As shown in the figure below, because it is a parent package, we will not write code here in our entire project. It is only used to manage

    Riko template, so delete its src folder


⑤ Build the sub-template, right-click on the project name, and select MavenModule


⑥ Click Next, fill in the sub-template name, Next,


⑦ Click Finish to complete, so that we have completed the creation of the sub-template that will be packaged into a jar package in the future.  

Steps to create a test1-core sub-template, commons is used to put tool classes, and core is used to put our dao, and service


⑧ Create our control layer sub-template to put the controller layer. The first two steps are the same as the above picture and click next

   

⑨ Select the webapp template as shown below and click next

   

⑩ Click finish to finish

   

11 Create a shop template with the same steps as creating a manager to put things like views. The final package structure is as shown below ,  

    Finally, the required jar package is introduced into the main pom file of test1, and the parent's pom file will be automatically introduced into the pom file of the sub-template, while commons only needs the parent's pom file, core, manager, and shop. All its superior pom files, so our Maven aggregation project is complete

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325359036&siteId=291194637