ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "terrance grahn" <>
Subject Running <exec> task with an "interactive" executable
Date Wed, 10 Oct 2007 17:29:58 GMT
I am trying to run an executable; however, I keep getting stumped on one
part.  I am able to run the executable correctly, but there is a point in
this executable that prompts the user for a password (and then asks them to
confirm it again).  I want to send this through the Ant task, but nothing I
use works.


    <target name="createInstance" >

        <!-- simple property to be used which will name the instance (assume
"instance1" is entered) -->
        <input message="Enter the instance name"

        <!-- calls the 'createinstance.bat' file and provides the input from
the arg line -->
        <exec inputstring="password" dir="d:/oracle/OAS10g/bin"
failonerror="true" executable="cmd" os="Windows XP">
            <arg line="/C createinstance.bat -instanceName


So this reads the arg line well, but it always errors out because nothing is
entered for the password.  Here is the output:

Creating OC4J instance "instance1"...
Set OC4J administrator password for "instance1" (password text will not be
displayed as it is entered):
Error creating new OC4J instance: OC4J administrator's password is null.

I Guess I need to know exactly how 'input' and 'inputstring' attributes can
be used with the exec task - I have not seen any examples anywhere that use
these attributes.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message