ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: AW: copy all but exclude one directory
Date Wed, 09 Feb 2005 07:56:37 GMT
Oh, sorry not sure about that. I usually use the **/* version and it works
as I 
thought it should.
Let´s have a look at the sources of patternset [1] ... okay -
PatternSet.NameEntry just
holds the name value. Evaluation is done in the DirectoryScanner [2]. There
it´s written
that name/ is name/** (private static String normalizePattern(String)). 

Mmh - "protected boolean isIncluded(String name)" does a simple comparison
of the 
current filename with all registered patterns. So it should be a different
meaning between
**/* and **   .


Jan


[1]
http://cvs.apache.org/viewcvs.cgi/ant/src/main/org/apache/tools/ant/types/Pa
tternSet.java?view=markup
[2]
http://cvs.apache.org/viewcvs.cgi/ant/src/main/org/apache/tools/ant/Director
yScanner.java?view=markup


> -----Ursprüngliche Nachricht-----
> Von: Douglas Kramer [mailto:Douglas.Kramer@Sun.COM]
> Gesendet am: Mittwoch, 9. Februar 2005 08:40
> An: Ant Users List
> Betreff: Re: AW: copy all but exclude one directory
> 
> Thanks.
> 
> Is there a difference between these two sets:
> 
>          <include name="**/*" />
>          <include name="**" />
> 
> -Doug
> 
> Jan.Materne@rzf.fin-nrw.de wrote:
> > BACKUP is a file
> > BACKUP/ or BACKUP/** is a directory
> > 
> > Jan
> > 
> > 
> >>-----Ursprüngliche Nachricht-----
> >>Von: Douglas Kramer [mailto:Douglas.Kramer@Sun.COM]
> >>Gesendet am: Dienstag, 8. Februar 2005 22:37
> >>An: Dominique Devienne
> >>Cc: Ant Users List
> >>Betreff: Re: copy all but exclude one directory
> >>
> >>Thanks, that works.
> >>
> >>I'll submit a request to document that <exclude> works
> >>to exclude only the specified files or directories -- that is,
> >>it must name all the files to exclude, not just a top-level
> >>directory.
> >>
> >>BTW, what's the reason that these are not equivalent:
> >>
> >>        <include name="**/*" />
> >>
> >>
> >>        <include name="**" />
> >>
> >>
> >>-Doug
> >>
> >>(It looks like including files below BACKUP is stronger
> >>than excluding the top-level directory BACKUP)
> >>
> >>Dominique Devienne wrote:
> >>
> >>>>From: Douglas Kramer [mailto:Douglas.Kramer@Sun.COM]
> >>>>              <exclude name="BACKUP" />
> >>>
> >>>Use              <exclude name="BACKUP/**" />
> >>>
> >>>--DD
> >>
> >>------------------------------------------------------------
> ---------
> >>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >>For additional commands, e-mail: user-help@ant.apache.org
> > 
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

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