Title: RE: [nant-dev] NAnt & CVS Directories

Erv,

You are right!!! I've given a look at LoopTask.cs and the
problem can be solved as following:

<target name="recurse"
  description="Builds recursively all subprojects">
  <foreach item="Folder" property="foldername">
    <in>
      <items>
        <includes name="*"/>
        <excludes name="CVS"/>
      </items>
    </in>
    <do>
      <nant buildfile="${foldername}/default.build"
        target="${project.config} ${target}"/>
    </do>
  </foreach>
</target>

It works. I've tested it.

Gius_.


> -----Original Message-----
> From: Erv Walter [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 04, 2003 2:51 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [nant-dev] NAnt & CVS Directories
>
>
> Foreach already supports filesets.
>
> Search the nant archives for a couple discussions that exactly solve
> this problem (of recursively building) using foreach filesets.
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On
> Behalf Of Simon
> Steele
> Sent: Wednesday, June 04, 2003 4:01 AM
> To: [EMAIL PROTECTED]
>
> I would have said that this would be better achieved by using
> a fileset
> and
> adding foreach support for filesets:
>
> Fileset "subdirs"
>       excludes CVS
>       includes directories
>
> Foreach item="fileset" in="subdirs" property="foldername"
>       ...
>
> This way we use the standard way of building up lists of
> files/directories.
>
> Just me two english pence.
>
> Simon.
>
> -----Original Message-----
> From: Greco Giuseppe [mailto:[EMAIL PROTECTED]]
> Sent: 04 June 2003 05:33
> To: Nant-Developers (E-Mail)
> Subject: [nant-dev] NAnt & CVS Directories
>
>
> Hi all,
> To recursively build all my subprojects, I've
> written a task like this:
> <foreach item="Folder" in="." property="foldername">
>   <nant buildfile="${foldername}/default.build"
>     target="${project.config} ${target}/>
> </foreach>
> That works fine until I don't import my project
> into CVS... After importing a project into CVS,
> each project's subdirectory contains a CVS directory
> which doesn't contain a build file, and the task
> above fails...
> A workaround would be to add failonerror="false" to the
> <nant> task, but in that way it would be difficult to
> notice if a subproject fails (that is really true for
> big projects with lots of subprojects).
> So, I think either we have to add a property to the
> <foreach> task in order to be able to discriminate
> the CVS directories
> <foreach item="Folder" in="." property="foldername" exclude="CVS">
>   <nant buildfile="${foldername}/default.build"
>     target="${project.config} ${target}" failonerror="false"/>
> </foreach>
> or NAnt should automatically ignore CVS directories.
> What do you think about that?
> PS: I apologise if I always send emails in HTML format: the problem
> is that here at T-System the standard mail client is Outlook, and
> even if I configured it to send out emails in plain text, Outlook
> still send them as HTML documents (that doesn't occur when I send
> you emails from my Linux machine at Agamura).
> Giuseppe Greco
> T-Systems CS AG
> Birkenstrasse 21
> 8306 Bruttisellen
> Phone: +41 (0) 1 805 57 20
> Fax:   +41 (0) 1 805 55 45
> Email: [EMAIL PROTECTED]
> Web:   www.t-systems.ch
>
> ______________________________________________________________
> __________
> This e-mail has been scanned for viruses by Star Internet. The
> service is powered by MessageLabs. For more information visit:
> http://www.star.net.uk
> ______________________________________________________________
> __________
>
>
> ______________________________________________________________
> __________
> This e-mail has been scanned for viruses by Star Internet. The
> service is powered by MessageLabs. For more information visit:
> http://www.star.net.uk
> ______________________________________________________________
> __________
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by:  Etnus, makers of
> TotalView, The best
> thread debugger on the planet. Designed with thread debugging features
> you've never dreamed of, try TotalView 6 free at www.etnus.com.
> _______________________________________________
> Nant-developers mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-developers
>

Reply via email to