The method Martin proposed has been discussed before. It would be tidier from a user point of view to allow adding to filesets without a seperate task - maybe using the mode attribute on the fileset itself

<fileset id="f1" basedir="c:\temp\foo" mode="append | replace" >    <!-- re-define f1 
fileset -->
   <includes name="item1"/>
   <includes name="item2"/>
  </fileset>

Martin - how does your implementation perform the merging ? Do you merge the raw xml of the old "f1" fileset with that of the new definition and instantiate a new fileset instance based on that ?

Ideally this would work for all "dataTypes" - not just filesets. If its doable for filesets doing it for all datatypes won't be much more work.


Ian



Jaroslaw Kowalski wrote:


How about a <modify-fileset> task? Like this:

<modify-fileset id="f1" mode="add | delete | replace">
   <fileset>
   </fileset>
</modify>

It would take either "replace" the f1 with the contents of <fileset>, "add"
new items or "delete" matching items.

Jarek
----- Original Message ----- From: "Martin Aliger" <[EMAIL PROTECTED]>
To: "! nant" <[EMAIL PROTECTED]>
Sent: Monday, January 05, 2004 12:13 PM
Subject: [nant-dev] filesets





Hi all,

this snippet:
 <if test="${1==1}">
  <fileset id="f1" basedir="c:\temp\foo">
   <includes name="item3"/>
  </fileset>
 </if>
is currently not possible because type definitions are allowed only at
project or task level. Is it intended or should we allow this as well?


I'm working on extension that will allow this: <fileset id="f1" basedir="c:\temp\foo"> <!-- define f1 fileset --> <includes name="item1"/> <includes name="item2"/> </fileset>

<if test="${1==1}">
<fileset id="f1" basedir="c:\temp\foo"> <!-- extend existing f1


fileset


with new item -->
   <includes name="item3"/>
   <includesFileset refid="f1"/>
 </fileset>
 </if>

that means - extending existing filesets. Use in the foreach is also
possible... What do you think about that?

Martin



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers






-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers




--
Ian MacLean, Developer, ActiveState, a division of Sophos
http://www.ActiveState.com




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to