ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Praveen.C" <prav...@elixirtech.com>
Subject Re: Command line input.
Date Wed, 27 Jun 2001 06:32:18 GMT
Hi Diane n All ,
I really don't understand...

See my current requirement is I need to
supply a file as input in command line
without writing my own task.

Can ant do this ? If so how ?
It would be very nice if you put in detail with
some code.

Thanks and Regards,
Praveen.C


----- Original Message -----
From: "Diane Holt" <holtdl@yahoo.com>
To: <ant-user@jakarta.apache.org>
Sent: Tuesday, June 26, 2001 11:42 PM
Subject: Re: Command line input.


> --- "Praveen.C" <praveen@elixirtech.com> 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
>
> =====
> (holtdl@yahoo.com)
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
>


Mime
View raw message