You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by JohnA <jo...@arrizza.com> on 2001/09/24 19:56:01 UTC

FileSet question

I have a fileset that looks like this:

      <local  dir="${rootdir}">
         <include name="."/>
         <include name="html/"/>
         <include name="cgi-bin/"/>
      </local>

What this is trying to do is include _only_ the two directories html and
cgi-bin in rootdir, i.e. exclude everything else. If I don't add the include
for "." it excludes everything in rootdir (I guess since "." is not
included).

Is this normal behaviour for Filesets or is this a bug in my taskdef? :)

John


RE: FileSet question

Posted by JohnA <jo...@arrizza.com>.
> -----Original Message-----
> From: Peter Donald [mailto:donaldp@apache.org]
> Thats not normal errror and looks like a bug (either in your code
> or ants).
> Could you try and track down exactly where this bug is ? ;)

Thanks for the response. The bug is most likely in my code. I'll verify and
let you know if otherwise.

John


Re: FileSet question

Posted by Peter Donald <do...@apache.org>.
On Tue, 25 Sep 2001 07:48, JohnA wrote:
> then
>       <local  dir="${rootdir}">
>           <include name="." />
>           <include name="html/" />
>           <include name="cgi-bin/" />
>       </local>
>
> will match the following files
>     html/h1.html
>     html/h2.html
>     cgi-bin/c1.pl
>     cgi-bin/c2.pl
>
> but
>       <local  dir="${rootdir}">
>           <include name="html/" />
>           <include name="cgi-bin/" />
>       </local>
>
> matches _nothing_, I don't get any files in the root directory nor in html
> or cgi-bin.
>
> Is this normal behaviour?

Thats not normal errror and looks like a bug (either in your code or ants). 
Could you try and track down exactly where this bug is ? ;)

-- 
Cheers,

Pete

---------------------------------------------------
"Therefore it can be said that victorious warriors 
win first, and then go to battle, while defeated 
warriors go to battle first, and then seek to win." 
              - Sun Tzu, the Art Of War
---------------------------------------------------


RE: FileSet question

Posted by JohnA <jo...@arrizza.com>.
> -----Original Message-----
> From: David Jencks [mailto:davidjencks@directvinternet.com]
> Maybe add
> >       <local  dir="${rootdir}">
> >          <include name="html/**"/>
> >          <include name="cgi-bin/**"/>
> >       </local>
> so you get files in the directories and not just the directories
> themselves.

Thanks. However, I am getting the files within html and cgi-bin if I add

  <include name="." />

If I don't have include "." then I don't get any files or subdirectories of
rootdir (of which html and cgi-bin are two).

For example, if root dir is john/abc and it has the following in it:

john/abc
   a.txt
   b.txt
   html
      h1.html
      h2.html
   dir2
      d1.txt
      d2.txt
   cgi-bin
      c1.pl
      c2.pl
   c.txt

then
      <local  dir="${rootdir}">
          <include name="." />
          <include name="html/" />
          <include name="cgi-bin/" />
      </local>

will match the following files
    html/h1.html
    html/h2.html
    cgi-bin/c1.pl
    cgi-bin/c2.pl

but
      <local  dir="${rootdir}">
          <include name="html/" />
          <include name="cgi-bin/" />
      </local>

matches _nothing_, I don't get any files in the root directory nor in html
or cgi-bin.

Is this normal behaviour?

John




Re: FileSet question

Posted by David Jencks <da...@directvinternet.com>.
Maybe add
>       <local  dir="${rootdir}">
>          <include name="html/**"/>
>          <include name="cgi-bin/**"/>
>       </local>
so you get files in the directories and not just the directories
themselves.

david jencks

On 2001.09.24 13:56:01 -0400 JohnA wrote:
> I have a fileset that looks like this:
> 
>       <local  dir="${rootdir}">
>          <include name="."/>
>          <include name="html/"/>
>          <include name="cgi-bin/"/>
>       </local>
> 
> What this is trying to do is include _only_ the two directories html and
> cgi-bin in rootdir, i.e. exclude everything else. If I don't add the
> include
> for "." it excludes everything in rootdir (I guess since "." is not
> included).
> 
> Is this normal behaviour for Filesets or is this a bug in my taskdef? :)
> 
> John
> 
> 
>