Ant prompt for username/password for Oracle / Svnant

While ant is usually used to run scripts automatically there are times when one requires that a the user name and password be dynamically be fed. For this the ant core task Input is available. It is really a cool task which will allow for the prompting of required variables at runtime.

To syntax for this task is:
<input message=”Please enter db-username:” addproperty=”db.user” defaultvalue=”Scott-Tiger”/>

Using this will create a prompt when the script is run. But wait for password you don’t want the password to be seen by others do you? Well Input does not provide for that. You can extend Ant’s input capabilities by writing a subclass of where you replace each character with a * or you can use Jera Ant Tasks. The query Task should fulfill ones needs.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: