Yes, if your service name is "tomcat" you can do something similar to
the following:
<exec dir="${src}" executable="cmd.exe" os="Windows 2000"
output="dir.txt">
<arg line="/c net start tomcat"/>
</exec>
<exec dir="${src}" executable="cmd.exe" os="Windows 2000"
output="dir.txt">
<arg line="/c net stop tomcat"/>
</exec>
Check out the Ant "exec" task documentation.
- Richard
-----Original Message-----
From: Jason W. Solinsky [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 10, 2005 10:26 AM
To: [email protected]
Subject: Controlling Tomcat Service From Ant
Is there anyway to effectively start or stop the Tomcat 5.5 windows
service from within Ant?
I tried
<exec dir="${tomcat.bin}" executable="tomcat5.exe">
<arg line="//SS//Tomcat5"/>
</exec>
but it produces an error message (although it works) and I don't know
what the corresponding command would be to restart the service. Is there
some standard way to accomplish this?
Thanks,
JWS
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]