3
votes

In eclipse, to run my dynamic web application, I do the following:

right-click on the project >> Run as >> Run on server

and then the application is deployed on the tomcat.

Now I want tomcat to use my ant script to build the war and then deploy that war.

How can I do this in eclipse?

1
Other than right click ant script >> run as >> ant build? - Andrew
Point of order, Tomcat won't know what to do with an Ant script. Eclipse executes Ant. - Pidster

1 Answers

0
votes

Right click the Ant script -> select "Run As" -> "Ant Build"

Select target and "Run"

There should now be an entry in the "Run" menu under "External Tools" which you can also reach with the red/green button in the toolbar (to the right of the "Run" button).