Jan,

On 29/09/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> The dir attribute is the root for a fileset. Why should the in/excludes be 
> relative to something else?

well, it's just that none of the examples make this explicit, even
though it seems logical in hindsight.

in the following snippet, it could be argued that all directory paths
are relative to the implicit project basedir.

<copy todir="out">
  <fileset dir="in" casesensitive="false">
    <exclude name="in/fig/*"/><!-- wrong,  I know -->
  </fileset>
</copy>

${basedir}/out
${basedir}/in
${basedir}/in/fig

so, continuing that argument, <exclude>'s name attribute value could
also be regarded as being relative to the basedir.

would it not be possible to simply add a note (or an example) that
clarifies the change of context?  just trying to be helpful.

> Jan
>

thanks,
Jakob.


> >-----Ursprüngliche Nachricht-----
> >Von: Jakob Fix [mailto:[EMAIL PROTECTED]
> >Gesendet: Donnerstag, 29. September 2005 14:35
> >An: Ant Users List
> >Betreff: clarification for Fileset documentation?
> >
> >Hello,
> >
> >I just spend an hour or so trying to understand why the
> >following wouldn't work:
> >
> ><fileset dir="${dir.in}">
> >  <exclude name="${dir.in}/fig/*.png"/>
> ></fileset>
> >
> >The reason is, and this is IMHO not mentioned in the
> >documentation, that the nested <exclude> and <include>
> >elements are relative to the directory defined in the
> ><fileset>'s dir attribute, and not relative to the current
> >directory (which it is not unreasonable to expect).
> >
> >The -debug output showed me the error, but it would be nice to
> >add this information to the documentation.
> >
> >The correct way to achieve this exclusion is:
> >
> ><fileset dir="${dir.in}">
> >  <exclude name="fig/*.png"/>
> ></fileset>
> >
> >
> >--
> >cheers,
> >Jakob.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to