I need to run an ant script from a shell script and if the ant script is executed successfully I must get the return code 0 or in case of failure 1. Can anyone tell me how can this be achieved?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
$?contains the error code of your last command, in this caseant.-ne 0means not equal 0, so if any error happened, execute theecho.You can specify the standard paramters to ant, i.e. your buildfile:
Summary of ant run options