Their own research project under the Eclipse multi-module Module development with Maven, to share with you!
Module1 points functional blocks, with the java package similar to the functional module in accordance with generally divided Module1, such as: sso / cas / portal / activity / system, according to the specific needs
The following example of a module of a system
--module-test-common common part
--module-test-picture picture
--module-test-order order
--module-test-checkout cart
--module-test-pay payments
--module-test-catory category
--module-test-product commodity
--module-test-price price
--module-test-account account
........
Now more should be using this feature to decoupling, module can be configured to pre-jar, the latter can also create unique pages, an independent site, accessed by way of a subdomain, various functional modules decoupling trend micro service architecture
1. Create a project
Step: File -> New -> Maven Project
Next
fill in GroupId and ArtifactId -> Next
Main works created
On FIG ..
2. Create a webModule
Right-click the item selected Maven-> NewMaven Module Project -> Module, select [Create from archetype], select [org.apache.maven.archetypes: maven-archetype-webapp]
If no fast way to generate the skeleton, it is necessary to set the module to pom.xml<packaging>war</packaging>
3. Create another module, other modules using the maven-archetype-quickstart
Note: If you do not quickly generate the skeleton, then need to be configured to build the pom.xml `<packaging> jar </ packaging>`
4. Deployment Services Tomcat
5. Run the project
Project directory as follows:
So what's the problem you are welcome to comment!