Thursday, July 2, 2009

MyEclipse upgrade - making a war file

In the older version of MyEclipse, we used JBoss plugin for Eclipse for .war file generation. But after the upgrade to MyEclipse 7.1, the JBoss plugin simply doesn't work anymore.

Of course, we could always write our own deployment descriptor, run ANT, and generate the .war file. But that also means install ANT on every developer's local machine, configure the path, go to command line every time, not something easy for everyday life.

So, after some research, here's the alternative:

Although MyEclipse does not require Tomcat plugin, we could just set the path and run different versions of Tomcat. But if we add the Tomcat plugin, we could generate .war file!

Step 1: Right click the project name -> properties

Step 2: Choose Tomcat from the bottom, then click Export to WAR settings.

Step 3: Browse to the correct directory and give the WAR file name.

Step 4: Click Apply and close the properties page.

Step 5: Right click the project name -> Tomcat Project -> Export to the WAR file sets in project properties.

Now we have a .war file ready to be deployed.

0 comments: