[ Team LiB ] |
10.8 Setting Up Ant to Use Tomcat's Manager Web Application10.8.1 ProblemYou want to set up your Ant buildfile to use Tomcat's Manager application. 10.8.2 SolutionCreate an Ant buildfile that invokes Ant targets to start and stop Tomcat, along with targets to install and remove web applications from Tomcat. 10.8.3 DiscussionSetting up a consistent build process is extremely important, especially if you are dealing with application servers that must be running during portions of the build process. For example, Chapter 7 discusses how to write unit tests that execute in a running server. In order for the tests to execute, a server must be started (in this case, Tomcat). To facilitate this process, a buildfile needs to ensure that the server is started before invoking any tasks that require a running server. Figure 10-1 shows a graphical view of the Ant buildfile. Earlier recipes discuss each target, minus the war target and its dependencies. Figure 10-1. Graphical view of an Ant buildfileThe following targets are executed in the following order when a user types ant deploy on the command line:
10.8.4 See AlsoThe next recipe shows how to set up your Ant buildfile to hot deploy applications to JBoss. Recipe 10.10 discusses how to hot-deploy web applications to JBoss. |
[ Team LiB ] |