ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Muralidhar Manku <muralidhar.ma...@gmail.com>
Subject Hide password in java ant task
Date Thu, 07 Jul 2011 13:37:24 GMT
Hi All,

I am using ant java task to execute a class file and passing some argument
to it. one of the argument to this java class is the database password.

When the java task is getting executed, the entire command along with the
password is displayed in the process (ps -ef).

Is  there any way to direct the java task to hide the password .

eg:
        <target name="gentest" >
        <java classname="Test2" fork="yes" failonerror="true">
            <arg value="${DBuser}/${DBpsswd}"/>
            <classpath>
                <pathelement path="/u01/user2/patch/testjavac"/>
            </classpath>

        </java>
        </target>


Note: Normally for other perl applications,  we are passing the password as
a piped argument. Is there any similar feature in ant.

eg: { echo "password"; } | perl test.pl

Thanks,
Muralidhar

-- 
Muralidhar

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