ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Ant Input Problem
Date Mon, 25 Jul 2005 07:10:59 GMT
Ant reassigns the System.[in|out|err] to its Listeners and InputStreams. 
Just an idea: 
- your program could write the input to file
- you start that program via <java spawn="true">
- you wait until timeout or availability of the file

Jan 

>-----Urspr√ľngliche Nachricht-----
>Von: Jacob Albertson [mailto:jalbertson2@smartmoney.com] 
>Gesendet: Donnerstag, 21. Juli 2005 21:40
>An: user@ant.apache.org
>Betreff: Ant Input Problem
>
>Hi,
>    I have written a CustomTask that waits for some input from 
>a web server in a loop but if it reaches a timeout it stops. I 
>want the user to have the option to press a and enter at 
>anytime to abort the check and continue execution. I have 
>implemented this in java using the System.in.available() 
>command and then the System.in.read(buffer, 0, c). My code 
>runs fine when run in java however when called through the 
>custom tasks ant never accepts input let alone send the input 
>to my program. No characters I type show up on the screen. 
>Basically the functionality I am looking for is non-blocking 
>input and am willing to implement it anyway possible even if 
>it is a bit of a hack. Thanks in advance. 
>
>Jacob 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message