I just started using Ant 1.8.2 as it was installed along with the latest Java Update for the Mac (JavaForMacOSX10.6Update4). Projects that worked fine with Ant 1.8.1 no longer work in 1.8.2. The problem seems to be that a Java task that forks a jvm hangs when it tries to read from System.in. Has anyone else seen this problem? Attached is a simple build.xml file that demonstrates the problem. It creates a simple Java file that just calls readLine() and echos the input, compiles the file, and runs it twice: once in a non-forked JVM, which works fine, and again in a forked JVM, which hangs. -- Ron -- Here is a sample output: > ant Buildfile: /Users/Ron/Development/Spots/tmp/ant-test/build.xml compile: [echo] [echo] ant.version = Apache Ant(TM) version 1.8.2 compiled on December 20 2010 [echo] ant.home = /usr/share/ant [echo] ant.library.dir = /usr/share/ant/lib [echo] ant.java.version = 1.6 [echo] [javac] Compiling 1 source file to /Users/Ron/Development/Spots/tmp/ant-test good: [echo] This will work: calling Java with fork=false [java] [java] Please enter some text and hit return: asdf [java] Text entered = asdf bad: [echo] This will hang: calling Java with fork=true [java] [java] Please enter some text and hit return: asdf ddfd C-c C-c --------------------------------------- On Mar 23, 2011, at 1:57 PM, Nicolas Lalevée wrote: I can reproduce it locally. Could you please fill a bugzilla bug report [1], I'll look deeper into it. Nicolas
Created attachment 26795 [details] build file to demonstrate the problem
Some stream was not flushed. Now fixed in trunk. Thanks for the report.
The edit done to fix this was svn 1086741
Link in viewvc is http://svn.apache.org/viewvc?view=revision&revision=1086741
*** Bug 50529 has been marked as a duplicate of this bug. ***