ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dale Anson <>
Subject Re: Need advice from somebody who uses (or avoids) SSHExec
Date Wed, 23 Apr 2003 00:29:27 GMT
Hi Matt,

I checked the source, the "failonerror" actually fails the build on 
error by throwing a BuildException. However, if the time limit is 
exceeded, it does not.

One way that I've used for running remote builds via sshexec is to have 
the remote Ant post it's status to a web page and/or send it's own 
e-mail messages. That way, if a single remote server fails, you'll know 
right away. This doesn't give you the central control and logging that 
you might be wanting, but it does circumvent getting the exit status. 
Another way, that I haven't tried, would be to have the remote Ant 
sshexec back to the central server and write it's exit status to a log 
when it is done.

You might also check the list archives, I seem to recall someone saying 
that they had a servlet that would kick off Ant via an http request, 
which might be another way to go.


Matt Reason wrote:

>Hi there,
>I assume this is a fairly well used task - unless you prefer to have a
>shell do all the remote commandeering.  What is the consensus on this?
>Does ANT even have any business doing SSH?
>Here is my setup:
>I would like to keep my entire build in ANT - just for the sake of
>cleanliness.  I have a central build server with a main build.xml and it
>deploys fresh code out to a ring of about 5 similar but different QA
>servers.  Each of those QA servers have a build.xml of their own.  I
>would like the central build.xml file to kick off ant on all the QA
>servers using SSHExec.
>I have set up SSHExec and in my preliminary testing I'm wondering why is
>there no way to make it fail on error? The documentation says the best
>it'll do is warn you (shouldn't that be called warnonerrror?). There
>doesn't seem to be a way to communicate an exit status from the remote
>command to the local build process. The only way I can think of is to
>have the remote build.xml wrapped in a shell that will either echo
>"PASS" or "FAIL" into an OutputProperty. But then that'd be the only
>verbosity you could get from the shell... Seems like a bit of a hack
>To me this is very important b/c I don't want the build to send off an
>email saying the build is done and the servers are up when indeed they
>are not.   I assume a lot of people have the same job I do, but I never
>hear people talking about the deployment process... best practices /
>theory / practical knowledge / etc.
>Any feedback or thoughts would be welcome.

View raw message