Hello there! I'm building an ant script that needs to stop the server, copy some files and then start it again. I'm using antcall to start/stop the server. So when I run my task it begins to stop the server, but it calls the start before the shutdown was donne.
How can I force the completion of the first antcall before the second is started?
Difficult. You can use the <waitfor /> task with nested socket and http elements to wait until the server stops responding. However in my experience this is not too reliable, though it may be worth a try (who knows, you may have better luck than I did). What I did that worked was write a custom task to tail the server log for a know "shutdown" log message. Once that arrived I assumed the server has properly shutdown and let Ant carry on.
I think Ant also has a sleep task if everything else fails.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
You may have just won ten million dollars! Or, maybe a tiny ad.
Free, earth friendly heat - from the CodeRanch trailboss