I want to run an ANT script which prompts the user for input, so it needs to be interactive through the console. at the same time I want to log the console content to a log file
Use tee.
tee
ant 2>&1|tee build.log
tee.exe is also available for Windows from http://unxutils.sourceforge.net/