I have three projects: app-api, app-services, app-web. They are Maven enabled, compiled nicely in Eclipse by m2eclipse. I'd like to create a separate project that aggregates the contents of the build folders of the app-* projects into a deployable entity in Tomcat administered by WTP.
I found EAR as one possibility. However, Eclipse didn't allow me to use Tomcat as the targe开发者_开发技巧t runtime for a new EAR (Enterprise Application) project.
Another route I tried: Create main as a web project managed by Maven. Add app-* as dependencies. It failed when I published this project to Tomcat. No classes and resources were copied.
Can anyone suggest a solution? I see that there're at least three obstacles/unknowns: 1. the packaging and the procedure to create such a project 2. the target runtime. 3. What role does m2eclipse play?
I'd appreciate pointers to tutorials.
Thanks.
What about using project references and having the three child projects have "order and export" enabled?
Back in older versions of Eclipse there was Java EE Module configuration option for order/export functionality, I think now you have to do the order/export in the build path properties.
I haven't confirmed that the above will work - just a theory.
精彩评论