ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <umag...@rediffmail.com>
Subject RE: search for words in a file
Date Mon, 22 Oct 2001 14:23:30 GMT

Hi:

> when the task is called the execute() is called...just 
> follow it
> 
> form there.
> 
> Next you will need to get the contents of the file and 
> parse
> 
> it. If it plain text then it is easy .. indexOf...
> 
> Hope this helps.

> >
> > I would like to search a word within a file.  For 
> example I do not want
> to
> > include any *.java files in my fileset that have a 
> 'main' method in it.

Now that you are into the do-it-yourself mode,
take a look at this link.  Please note that this patch
has been rejected as features like this are going to 
make its way into Ant2 using a better design - in
other words, you are on your own if you choose to use
this.  This patch will specifically address your need
of having the ability to include/exclude files into a 
fileset based on its contents.

http://marc.theaimsgroup.com/?l=ant-dev&m=100320234112776&w=2

Thanks,
Magesh

 


Mime
View raw message