ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40014] - have to enter valid input multiple times on second build file for input task
Date Thu, 27 Jul 2006 18:45:24 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40014>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40014





------- Additional Comments From jglick@netbeans.org  2006-07-27 18:45 -------
Since no one else provided a small, self-contained, reproducible test case:

---%<---
<project default="x">
    <target name="x">
        <input message="A:" addproperty="pa" validargs="one,two"/>
        <echo>pa=${pa}</echo>
        <echo file="X.java">public class X { public static void main(String[] x)
{} }</echo>
        <javac srcdir="." destdir="." includes="X.java"/>
        <java fork="true" classpath="." classname="X"/>
        <input message="B:" addproperty="pb" validargs="one,two"/>
        <echo>pb=${pb}</echo>
    </target>
</project>
---%<---

producing on Linux

---%<---
$ ant -f /tmp/testant40014.xml 
Buildfile: /tmp/testant40014.xml

x:
    [input] A: (one, two)
one
     [echo] pa=one
    [javac] Compiling 1 source file to /tmp
    [input] B: (one, two)
two
two
     [echo] pb=two

BUILD SUCCESSFUL
Total time: 8 seconds
---%<---

I'll confess I neither understand what causes the problem, nor know how it could
be solved. Unixish pipes have the unpleasant property that the receiver can know
when the producer has sent some bytes, but the producer cannot know if the
receiver is expecting any bytes, meaning that for <java fork="true"> there is no
way for Ant to know whether the process will ever read from stdin or not.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message