How can I build an EAR file from a Dynamic Web Project in Eclipse?

ZKSteffel picture ZKSteffel · Jun 7, 2011 · Viewed 55.8k times · Source

I'm looking at deploying a web service which I've written in Eclipse to an EAR file. I'm able to export it as a WAR and deploy it on Tomcat all fine and dandy, but the final product won't be on Tomcat, and won't be a WAR file. I'll need to use Websphere as a server, which I have access to and can deploy valid EAR files... if I had an EAR file to deploy.

So long story short, how do I export an EAR file from a Dynamic Web Project in Eclipse?

Answer

Matt Ball picture Matt Ball · Jun 7, 2011

You need to create an Enterprise Application Project (basically, an EAR) in Eclipse, add the Dynamic Web Project to the EAR project, and then export the whole thing.