Is it possible to pre-defined a fileset before using it???. To keep things neat, I want to predefined a fileset instead of using it first in a foreach, or copy task.
However, I don't think this is possible. [EMAIL PROTECTED] wrote on 03/15/2005 11:47:28 AM: > That second choice was exactly what I was looking for. > > Thanks! > > Leonardo > > > On Tue, 15 Mar 2005 16:45:45 -0000, > [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > Hi Leonardo, > > > > You can do this with the <foreach> task by using the file object. E.g. > > > > <foreach item="File" property="prop.file"> > > <in> > > <items refid="my.fileset" /> > > </in> > > <do> > > <!-- Put your fxcop stuff here? --> > > </do> > > </foreach> > > > > The <in> block can be either a fileset definition or a refid to a fileset > > you've defined elsewhere. The prop.file property will contain the name of > > the file on each iteration of the loop. > > > > On re-reading your post, I think what you actually want is to predefine the > > file set. You can do something like: > > > > <fileset id="my.fileset"> > > <includes name="Project1/bin/*.dll" /> > > <includes name="Project2/bin/*.dll" /> > > <includes name="Project3/bin/*.dll" /> > > </fileset> > > > > Then use: > > > > <fxcop directOutputToConsole="true" projectFile="${build.dir}/Sample.fxcop"> > > <targets refid="my.fileset" /> > > </fxcop> > > > > HTH, > > > > Bill > > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Leonardo > > Quijano Vincenzi > > Sent: 15 March 2005 16:18 > > To: nant-users@lists.sourceforge.net > > Subject: [Nant-users] Fileset and loops > > > > Hi, > > > > Is there any way to loop in a fileset over a list property? I'm trying > > to set an fxcop task like this: > > > > <fxcop directOutputToConsole="true" projectFile="${build.dir}\Sample.fxcop"> > > <targets> > > <include name="Project1\bin\*.dll" /> > > <include name="Project2\bin\*.dll" /> > > <include name="Project3\bin\*.dll" /> > > <include name="Project4\bin\*.dll" /> > > </targets> > > </fxcop> > > > > But I don't want to specify every project on all related tasks (NUnit > > and such). Instead, I'd like to set a list property "${subprojects} = > > "Project1, Project2, Project3, Project4", and set a loop over that > > list: > > > > <fxcop directOutputToConsole="true" projectFile="${build.dir}\Sample.fxcop"> > > <targets> > > <foreach item="String" in="${subprojects}" delim=" ," > > property="subproject.name"> > > <include name="${subproject.name}" /> > > </foreach> > > </targets> > > </fxcop> > > > > Of course, the "targets" fileset doesn't support this. Is there any > > way to do this? > > > > Thanks > > > > -- > > Ing. Leonardo Quijano Vincenzi <[EMAIL PROTECTED]> > > > > ------------------------------------------------------- > > SF email is sponsored by - The IT Product Guide > > Read honest & candid reviews on hundreds of IT Products from real users. > > Discover which products truly live up to the hype. Start reading now. > > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > > _______________________________________________ > > Nant-users mailing list > > Nant-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/nant-users > > > > UK businesses use 2 million tonnes of paper each year. > > THINK before you PRINT this email. > > ______________________________________________________________ > > > > CONFIDENTIALITY NOTICE > > > > This communication and the information it contains is intended for > the person or organisation to > > whom it is addressed. Its contents are confidential and may be > protected in law. Unauthorised use, > > copying or disclosure of any of it may be unlawful. If you are > not the intended recipient, please > > contact us immediately. > > > > The contents of any attachments in this e-mail may contain > software viruses, which could damage your > > own computer system. While Marlborough Stirling has taken every > reasonable precaution to minimise > > this risk, we cannot accept liability for any damage, which you > sustain as a result of software > > viruses. You should carry out your own virus checking procedure > before opening any attachment. > > > > Marlborough Stirling plc, Registered in England and Wales > > Registered No. 3008820, > > Jessop House, Jessop Avenue, Cheltenham, Gloucestershire, GL50 3SH > > Tel: 01242 547000 Fax: 01242 547100 > > http://www.marlborough-stirling.com > > > > > > > -- > Ing. Leonardo Quijano Vincenzi <[EMAIL PROTECTED]> > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Nant-users mailing list > Nant-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nant-users ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Nant-users mailing list Nant-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users