Bug 19077 - Telnet task doesn't support failure
Summary: Telnet task doesn't support failure
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: 1.7.0
Hardware: Other other
: P3 enhancement with 1 vote (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2003-04-16 16:21 UTC by Michael Mason
Modified: 2009-07-30 07:59 UTC (History)
0 users



Attachments
Patch to add failon attribute to telnet's read task. (6.27 KB, patch)
2003-04-16 16:22 UTC, Michael Mason
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Mason 2003-04-16 16:21:31 UTC
The Ant telnet task doesn't support failing early if something goes wrong. What 
I wanted to do was run a script on a remote server, which finishes with "ok" if 
everything worked and "failed" if not. The remote script could take some time, 
which is why waiting for "ok" with a timeout wasn't quite good enough.

I've added code to TelnetTask which allows a new "failon" attribute for <read> 
elements. If the text in the attribute is read from the connection, the task 
fails. I use this to stop a build if deployment to a remote container fails.

I'll attach the patch (cvs -q diff -u) after creating the bug.
Comment 1 Michael Mason 2003-04-16 16:22:16 UTC
Created attachment 5861 [details]
Patch to add failon attribute to telnet's read task.