Can't you just get a file list from the folders and loop through all the
.build files?

 

Also, I'm not sure what you are doing. When is the .build file added?
Within your build... why not eval the file set after that .build file
gets created.

 

BOb

 

 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, April 18, 2008 11:39 AM
To: [EMAIL PROTECTED]; nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] Adding Files to an Existing Fileset

 

I don't think you can do what you are after, but two other options
spring to mind.  One is as you suggest, which is to define the fileset
and just add to it.  This is OPK if you are just generating the fileset
of .build files, but may be a pain if you have to add it to several
filesets.  E.g.

 

    <fileset id="project.buildfiles">

        <include name="foo/foo.build" />

        <include name="bar/bar.build" />

        <include name="baz/baz.build" />

    </fileset>

 

The other assumes that you only want the build files, and that there
won't be any build files you don't want to build.  In that case, just
use the wildcard to add them, for example:

 

    <fileset id="project.buildfiles">

        <include name="**/*.build" />

    </fileset>

 

This will automatically pick up all build files under your location, but
of course if you don't want to build a project, it won't work.

 

HTH,

 

Bill

 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aquil H.
Abdullah
Sent: 17 April 2008 23:32
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Adding Files to an Existing Fileset

 

Hello All,
  I've searched pretty hard to find a way to add files to an existing
fileset, but I haven't come up with anything that I really like.  Does
anyone know of a way to perform something like the following

<property components="foo,bar,baz">

<foreach item="String" delim="," in="${component}" property="component">
  <fileset id="project.buildfiles">
    <include name="${path::combine(component,component+'.build')}" />
  </fileset>
</foreach>

Basically, what I am trying to do is dynamically add buildfiles to my
project whenever I add a new component just by adding it to the
component string.
I may over thinking this one as it is probably just as easy to add an
include line to an existing fileset.  Anyway, just wondering.

Also if you have opinions as to why this wouldn't be a good idea I would
like to hear those as well.
-- 
Aquil H. Abdullah
[EMAIL PROTECTED] 
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________




IMPORTANT 
The information contained in this e-mail and any attachments is intended
for the addressee only
and may contain legally privileged or confidential information. If you
are not the intended
recipient you must not use, disclose, copy, distribute, alter, or take
any action in reliance
on the information and Avon Insurance plc will not accept liability for
any loss or damage howsoever
arising, directly or indirectly in reliance on it and gives no warranty
or representation as to its
accuracy or reliability. If you are not the addressee, please notify us
immediately on 01789 202121*
and delete the material from your computer and destroy any copies.

Avon Insurance plc reserves the right to monitor and record incoming and
outgoing email messages for
the purposes of investigating or detecting unauthorised use of its
system and ensuring its effective operation.
Avon Insurance plc will not accept liability for any loss or damage as a
result of any virus being passed on.

Avon Insurance plc (No. 209606). 
Registered in England. Registered Office: Arden Street, Stratford upon
Avon, Warwickshire CV37 6WA.
Authorised and regulated by the Financial Services Authority.
A member of the NFU Mutual group of companies and the Association of
British Insurers.

*For security and training purposes, telephone calls may be recorded and
monitored. 
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to