I need to stop the glassfish server, deploy my war into the glassfish and then start it again using ant.
I can successfully copy the war and make necessary configuration changes using ant tasks. But how do I stop and start the glassfish server using ant?
Basically I would want to execute the startserv.bat file in /glassfish/bin using ant.
Please help
Edit
This is what I have tried so far.
<project name="Start Server" basedir="." default="startServer">
<target name="startServer">
<exec dir="G:\Program Files\glassfish3\glassfish\bin" executable="cmd.exe" os="Windows XP">
<arg value="startserv.bat"/>
</exec>
</target>
</project>
You may use
exectask to start/stop serverUpdate:
You missing
/cswitch which used to run.batfiles on Windows