--- "Praveen.C" <[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> How to make ant read command line input ?
>
> Becoz in my project Iam writing ant buildfile
> for obfuscation.
>
> Since I dont know how to use command line
> input, I do something like this
>
> ############ant build file#############
> <target name="obfuscate" depends="init" description="">
> <taskdef name="Retroguard" classname="Obfuscation"/>
> <Retroguard message="The files are obfuscated"/>
> </target>
>
> #### java file ###### In execute() method
> System.out.println("Enter file name to be obfuscated. :");
> DataInputStream file = new DataInputStream(System.in);
> String fileName = file.readLine();
> Runtime.getRuntime().exec("java RetroGuard "+fileName+
> " Obfuscatedefs.jar script.rgs elixir.log");
> ####################################
>
> How to avoid this java file and make the xml file itself
> do this task.
>
> Any help on this will be highly appreciated.
If you write your target to include a property reference for the name of
the file to do (eg., ${file}), you can then run Ant and include the
definition of the file with -Dfile="filename" on the command line. (You
should also then include a test-on-file-defined, so if it's not, you can
exit gracefully.)
Diane
=====
([EMAIL PROTECTED])
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/