Ant hangs when running java class that reads from std in -
i have java class reads std in. when run class ant using java task ant hangs , doesn't display prompt input nor accept input command line. hangs there. if run same class using shell script works.
does know why ant doing this? i've tried setting fork (on java task) true , false. neither 1 worked.
ant doing system.in , system.out intercepting (watch happens when system.out.println() inside custom task), accomplish after working input task
http://ant.apache.org/manual/tasks/input.html
for example, have task called accountsettings following code
public class accountsettings extends task { private string guid; public accountsettings() { super(); guid = null; } public void execute() throws buildexception { if(guid != null) { //do guid } else { throw new buildexception("guid not defined!"); } } public void setguid(string value) { guid = value; } }
and have "guid" value set via input task following bit of xml
<taskdef name="settings" classname="accountsettings"/> <input message="enter account guid" addproperty="account.guid"/> <settings guid="${account.guid}"/>
Comments
Post a Comment