Bug 50400

Summary: SecureHandler does not write to std err but to std out
Product: Ant Reporter: Michael Osipov <michaelo>
Component: Core tasksAssignee: Ant Notifications List <notifications>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 1.8.2   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Michael Osipov 2010-12-02 05:43:53 UTC
The secure input handles ouput looks like this:
Please enter the Tomcat Manager App admin password:

customize:
     [echo] Starting Tomcat customization...

The [input] is missing.
The default input handler does has the input tag as prefix. The difference is that def input handler prompts on System.err. The Console docs do not reveal where the console is attached to.
Anyway, this problem can be fixed.
In that line http://svn.apache.org/viewvc/ant/core/tags/ANT_181/src/main/org/apache/tools/ant/input/SecureInputHandler.java?view=markup#l48
you see the readPassword with args is called. If you replace the line with:

System.err.print(prompt);
and now invoke reflectively the readPassword method without any parameters, this should work as the other input handler.