Accessing the Ant SecureInputHandler in an Ant Build File
I am using Ant within IntelliJ (Ultimate v14.0.3). In the final deploy step I need to input a user ID and password to be used to execute the file transfer. I want to do the password input securely. The Ant documentation describes the use of input handlers, and in particular, a SecureInputHandler. This class resides within the ant.jar file bundled with IntelliJ 14. If I include the Ant task to use the SecureInputHandler, the password dialog is not displayed, and the build hangs at the password input step. If I leave out the reference to the SecureInputHandler, the build runs fine, but the password is visible as plain text (not asterisks or dot symbols). Here is a snippet of my build file:
<target name="cme.deploy" depends="cme.cleanup" description="securely upload jar file to server">
<input message="Please enter Atlas username:" addproperty="atlas.username"/>
<input message="Enter password for Atlas: " addproperty="atlas.password">
<handler classname="org.apache.tools.ant.input.SecureInputHandler"/>
</input>
<echo message="Uploading jar file to server using pscp" />
Can anyone please provide the proper method for accessing the SecureInputHandler in an Ant build running within IntelliJ?
Thanks,
Dave
Please sign in to leave a comment.