dcsimg
How can I automatically unpack, start, stop, and reload Tomcat using Ant?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alex_Chaffee
Posted On:   Wednesday, December 4, 2002 05:53 PM

The Bootstrap Group has developed Ant targets for automatically performing the following tasks. They Unpack Tomcat into a specified location Start Tomcat Stop Tomcat and wait for it to exit Reload any or all contexts (applications) The cool part is that during the unpacking, it automatically configures Tomcat settings like docBase and Admin password, based on the local directory structure and on configurable Ant properties. So, for instance, your developers can check out your project anywhere on their hard disk, run "ant tom   More>>

The Bootstrap Group has developed Ant targets for automatically performing the following tasks. They


  • Unpack Tomcat into a specified location




  • Start Tomcat




  • Stop Tomcat and wait for it to exit




  • Reload any or all contexts (applications)






The cool part is that during the unpacking, it automatically configures Tomcat settings like docBase and Admin password, based on the local directory structure and on configurable Ant properties.


So, for instance, your developers can check out your project anywhere on their hard disk, run "ant tomcat-unpack", and then get a Tomcat that knows where the app root is (without even needing to install your apps in Tomcat's webapps directory).


The targets are in the .


As of 12/4/02, they look like this:

			










































dest="build/temp/reload-calliope.out"
verbose="on"
username="admin"
password="${admin-password}"/>

dest="build/temp/reload-integration.out"
verbose="on"
username="admin"
password="${admin-password}"/>



























   <<Less

Re: How can I automatically unpack, start, stop, and reload Tomcat using Ant?

Posted By:   Erik_Hatcher  
Posted On:   Friday, December 6, 2002 01:27 AM

This is very nice. Just a couple of suggestions:

  • Have a look at Cactus to see examples of how to start/stop Tomcat using rather than - its then cross-platform

  • Have a look at the latest Tomcat - it includes Ant tasks that do the equivalent of the 's you have to control it, which makes it look cleaner in Ant and less brittle as its interface can stay constant even if the underlying mechanism/URL's change.

Nice work!
About | Sitemap | Contact