简体   繁体   中英

m2eclipse/Eclipse/WTP: Create a container project that can be deployed in WTP

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 target 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM