

We must then define the start and stop Tomcat targets as follows: Here is my build.properties file: root.dir=.įirstly you must tell Ant where the Tomcat classpath is located. The assumptions are that the penultimate task is called war and that there is a build.properties file that defines the required directories. This example shows how to automate the starting of the Tomcat server. However, the process can be automated a little further by starting the Tomcat server after the final deploy task has finished.

One task that is particularly useful is the compile and deploy a web application.

Apache ant is a tool used to automate repetitive development tasks.
