ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject RE: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs
Date Thu, 14 Dec 2000 00:20:56 GMT
Hmmm - I just had a thought. What does every one think about associating a
mapper with each fileset ? 

We could thus have something like

<fileset dir="my/dir/">
  <include name="**/*.classes" />
  <mapper type="prefix" to="my/prefix">

for prefixes. Or

<fileset dir="my/dir/">
  <include name="" />
  <mapper type="merge" to="META-INF/MANIFEST.MF">

for single files ?

At 04:15  13/12/00 -0500, Rosen, Alex wrote:
>That's a valid point, though I can definitely see this either way. If Ant
>supported the prefix and/or fullpath attributes on all tasks where it made
>sense (e.g. copy and move), would you still object?
>In any case, with Pete's latest change, both <filesets> and
>can have these extra attributes in Zip tasks. This is either the best or
>of both worlds, depending on how you look at it. It's being flexible about
>you accept - we tell users to use <prefixedfileset> when the use these
>attributes, but if they forget, we'll take it anyway. I think this is
>a bad idea, although if we change it, and you forget and accidentally say
><fileset prefix="foo">, you probably wouldn't get a very helpful message. (It
>would tell you that <fileset> doesn't take a prefix attribute, instead of
>suggesting that you need to use <prefixedfileset> to use the prefix
>> -----Original Message-----
>> From: Stefan Bodewig []
>> Sent: Wednesday, December 13, 2000 2:51 AM
>> To:
>> Subject: Re: cvs commit:
>> jakarta-ant/src/main/org/apache/tools/ant/taskdefs
>> <> wrote:
>> >   Deprecated <prefixedfileset> element of war in favour of
>> >   normal <fileset> element in zip
>> I don't like this. This means we have a <fileset> in <copy>, <move>
>> and many other tasks that does not support the prefix attribute and a
>> <fileset> in <zip>, <jar> and <war> that does.
>> I.e. we have a fileset element in Ant buildfiles with two different
>> attribute lists depending on context. This is not only giving us a
>> headache when we want to provide a DTD, this will also confuse the
>> user (is this a fileset that supports prefix or is it one that
>> doesn't).
>> Stefan


| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |

View raw message