Scenario: A Web project that contains a Java sub-project. The jar packages and code in the subproject are required for deployment. So when you pack, you need to put the project into a jar package and place it under a Web project for invocation.
Method:
1. Associate sub-projects first
Exlipse (Myexlipse), right-click Web Project, Build Path-->projects--add, add in the project.
At this point, the Web project can use the code in the subproject, and there is one more in the. classpath file:
<classpathentry combineaccessrules= "false" kind= "src" path= "/Sub-project name"/>
2, right-click the Web project, Properties-->deployment Assembly-->add-->project, the project add in, you can see the deploy path has a child project jar package. Such deployment and packaging will automatically hit the project.
The second step depending on the IDE or version may be different, the difference is that there are some deployment assembly name is different, some do not need a second step
This article is from the "Perfectionism" blog, please be sure to keep this source http://liangxueming.blog.51cto.com/3911546/1564537
Java Web Project Auto-manage subproject, and sub-project packaging