Build a Maven project under Eclipse, which consists of multiple sub-projects
1. Create a parent project
New-->project-->maven-->maven project, click Next to enter new MAVEN project's Select project name and location interface
650) this.width=650; "Title="%nbslux6]g (czp@38l]mce7.png "alt=" wkiom1lsv8wagm1vaabympe96vi001.png-wh_50 "src=" Https://s3.51cto.com/wyfs02/M01/9C/1B/wKiom1lsV8WAgm1VAAByMpE96VI001.png-wh_500x0-wm_3-wmp_4-s_1537723667.png " />
650) this.width=650; "title=" Qq20170717142400.png "alt=" wkiom1lswbqiavctaabc5pvsmw0796.png-wh_50 "src=" https:// S3.51cto.com/wyfs02/m01/9c/1b/wkiom1lswbqiavctaabc5pvsmw0796.png-wh_500x0-wm_3-wmp_4-s_106569945.png "/>
Select the Options box in the diagram and the next step
650) this.width=650; "title=" pukho3~relrw{v) z6g8[pru.png "src=" https://s4.51cto.com/wyfs02/M00/9C/25/ Wkiom1lsnladb_l9aaboetyj9m8937.png-wh_500x0-wm_3-wmp_4-s_4162727141.png "alt=" wKiom1lsnLaDB_ L9aaboetyj9m8937.png-wh_50 "/>
Enter the name of the project you want to build, and the description is optional. Then click Finish and the parent project is created.
650) this.width=650, "title=" _e2u$) j0h) 5_a[q[ciit][2.png "src=" https://s3.51cto.com/wyfs02/M01/9C/25/ Wkiom1lsnqmsnifvaab46w0wkpg044.png-wh_500x0-wm_3-wmp_4-s_2546109838.png "alt=" Wkiom1lsnqmsnifvaab46w0wkpg044.png-wh_50 "/>
At this point the parent project's Pom file looks like this:
650) this.width=650; "title=" O{m$[q6]74uzpqfwi8v[qvw.png "src=" https://s5.51cto.com/wyfs02/M01/9C/25/ Wkiol1lsn8xboy6qaabrfoxagb4461.png-wh_500x0-wm_3-wmp_4-s_645893139.png "alt=" Wkiol1lsn8xboy6qaabrfoxagb4461.png-wh_50 "/>
2. Creating sub-projects
2.1 Delete the src file in the project (optional, mainly see personal needs)
2.2 Select the item, right-click, select New-->project-->maven-->maven Module, click Next, enter the name of the sub-item in the interface that appears, click Next, the Select an archetype interface appears. At this point, select Maven-archetype-site-quickstart or Maven-archetype-webapp (used when building the Web tier) and choose Finish, which is to build the subproject.
Final results
650) this.width=650; "Title=" f%wx786q5c (0oppzs$oj15f.png "src=" https://s5.51cto.com/wyfs02/M02/9C/25/ Wkiol1lsoxmtnlqvaaa-bblahbm424.png-wh_500x0-wm_3-wmp_4-s_19741219.png "alt=" Wkiol1lsoxmtnlqvaaa-bblahbm424.png-wh_50 "/>
At this point, the child project of the parent project is completed, and the other sub-projects are built similarly.
When you build the second subproject, it may not appear in the parent project in a timely fashion, as long as the project is refreshed.
In fact, in the ordinary project is not allowed to build sub-modules, whether to create sub-modules under a project, mainly depends on whether there is <packaging>pom</packaging> this configuration. If you have this configuration, you can create sub-modules for any project.
This article is from the "http://82711020.blog.51cto.com/12993840/1948334" blog, please be sure to keep this source.
Eclipse creates a MAVEN project (parent-child project)