i have an ant build.xml that does some building stuff. Before i execute this though, i need some variables/environment to be set. i am using .bat
script to do that, and also trying to call ant
directly from there, so that i dont have to do 2 steps.
Although the script calls the ant target alright, the command prompt window auto exits as soon as the ant build is complete(irrespective of build failure/success)
i have tried pause
and also cmd /k
neither of them have seemed to work.
the .bat
file looks something like this:
@echo off
call C:/somefile.bat
ant targetName
pause
cmd /k
If the ant script is a console app then you will need to call
that also, otherwise control will be transferred to it and never return to the batch
@echo off
call C:/somefile.bat
call ant targetName
pause
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With