ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Holzwarth <>
Subject Re: Halt Ant script question
Date Mon, 21 Jan 2008 22:10:10 GMT
One issue is that you are running the second ant build on a different system, potentially,
via ssh. The error may be transmitted to the shell that is running, but not transmitted back
to the parent script. On the local system you may see the result of being able to issue the
ssh command but not result of running the ant script. The docs are not clear on that. There
is a difference in having the ability to run an ssh and the error results produced on the
remote system during the ssh. From the target, you are issuing multiple commands on the remote
system and not trapping the errors from any of them. Remember that the "cd" command can fail
and you are not where you expect to be but the sshexec probably will not fail.

It may be easier to have your ant script on the remote machine write the success to a file
and ftp it back to check the error status. Using a file based semaphore is often the best
way to get status results since it is generally portable among operating systems. This can
give you more granular information than just that an error has occurred.
Thank you,
Chuck Holzwarth
(804) 403-3478 (home)
(540) 335-3171 (cell)

----- Original Message ----
From: jpyork <>
Sent: Monday, January 21, 2008 1:30:44 PM
Subject: RE: Halt Ant script question

This is the start of the target I use:

         <target name="deploy_War" description = "Copy war file to
todir="${scp.url}" trust="true"/>

                     <sshexec host="${host.autodeploy}" trust="true"
                    echo 'Starting Deployment';
                    cd '/test/home/asadmin';                        
                    echo 'Triggering Deployment script on Server';
 -DbuildVersion=${buildVersion} -buildfile

Toomey, Kevin H (ATS, IT) wrote:
> Can you give an example of how the first script is calling the
 second? Are
> you using <ant>, or <antcall>, or <excec>, or something else?
> -----Original Message-----
> From: jpyork []
> Sent: Monday, January 21, 2008 11:58 AM
> To:
> Subject: Halt Ant script question
> I am running 2 scripts and my problem is when the first script runs
> the
> calls the 2nd one, sometimes the 2nd one will fail and that does not
> my 1st one to fail.  
> I am looking for a way to have my main script halt/fail if the 2nd
> does not work.  What is the task to do this?
> -- 
> View this message in context:
> Sent from the Ant - Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
> This communication, including attachments, is
> for the exclusive use of addressee and may contain proprietary,
> confidential and/or privileged information.  If you are not the
> recipient, any use, copying, disclosure, dissemination or
 distribution is
> strictly prohibited.  If you are not the intended recipient, please
> the sender immediately by return e-mail, delete this communication
> destroy all copies.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View this message in context:
Sent from the Ant - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

Never miss a thing.  Make Yahoo your home page.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message