I have an ant file that has the following target in it:
<target name="xxx">
<echo message="${ant.version} ::: ${java.version}"/>
<input message="Enter userId:" addproperty="user.id"/>
<input message="Enter password:" addproperty="user.pw">
<handler classname="org.apache.tools.ant.input.SecureInputHandler" />
</input>
<echo message="user=${user.id}, password=${user.pw}"/>
</target>
When I run from the command line I get versions 1.8.0 for ant and 1.6.0_13 for Java, and I get the behavior I am expenting. The user.id is displayed as it is typed, and the user.pw is not. The values echoed out are what was typed in. When I run this inside eclipse, with ant set to run in a seperate JRE I get
BUILD FAILED
C:\workspaces\testArea\ProjectManagement\newProject.ant:236: Failed to read input from Console.
at the point the user.pw is being read, no input popup is displayed.
When I run in the same JRE as MyEclipse it prompts for the user.id in the popup window, then seems to be trying to read from the console window, but anything typed is displayed as it is typed (this is not secure) and nothing I type seems to end the input, it remains in a read state until I kill the ant session.
I really need to read password, since we do not want to store them, and keep then from being seen as they are typed.
Any ideas?