I thought that it would be a useful thing to have in NAnt so I sat down and
implemented it. Attached is the patch that adds support for

<nant>
    <buildfiles>
    </buildfiles>
</nant>

where <buildfiles> is a fileset containing *.build files (surprise;-)
You can specify both <nant buildfile="..." > and <buildfiles> and they will
be

This allows for some simplification of NAnt.build process so NAnt.build was
the first file that I tested this on. Works great.

See the results inside.

Gert, Ian, Scott - may I commit this?

BEWARE: You have to apply this patch like this:

1. Apply nanttask.patch
2. Rebuild NAnt with UpdateBin
3. Apply the rest of the patch
4. Rebuild NAnt

Jarek

----- Original Message ----- 
From: "Giuseppe Greco" <[EMAIL PROTECTED]>
To: "Jaroslaw Kowalski" <[EMAIL PROTECTED]>
Cc: "Gert Driesen" <[EMAIL PROTECTED]>; "NAnt Developers"
<[EMAIL PROTECTED]>
Sent: Saturday, March 06, 2004 8:44 AM
Subject: Re: [nant-dev] Patch


> On Sat, 2004-03-06 at 06:47, Jaroslaw Kowalski wrote:
>
> Jarek,
>
> yes, that could be another good alternative.
>
> j3d.
>
> > Hi Giuseppe!
> >
> > Looks like that you really need a support for filesets in the <nant>
task.
> > This way you could get rid of your gateway buildfile:
> >
> > Like this:
> >
> > ----------- MASTER.build ----------
> > <fileset id="subprojects">
> >     <includes name="**/*.build" />
> >     <excludes ... />
> > </fileset>
> >
> > <target name="build">
> >     <nant target="build">
> >         <buildfiles refid="subprojects" />
> >     </nant>
> > </target>
> > -----------------------------------
> >
> > gateway.build goes away.
> >
> > Am I right? This looks like another (simpler) way to implement your
required
> > features without the need for wildcard targets (I assume that your
master
> > file won't contain any).
> >
> > Jarek
> > ----- Original Message ----- 
> > From: "Giuseppe Greco" <[EMAIL PROTECTED]>
> > To: "Gert Driesen" <[EMAIL PROTECTED]>
> > Cc: "NAnt Developers" <[EMAIL PROTECTED]>
> > Sent: Saturday, March 06, 2004 1:01 AM
> > Subject: Re: [nant-dev] Patch
> >
> >
> > > Gert,
> > >
> > > this new patch should be OK.
> > >
> > > By the way, I've noticed something very strange;
> > > to avoid the infinite loop, I've just modified
> > > the code at line 782 from
> > >
> > > do {
> > >   currentTarget = (Target) sortedTargets[currentIndex++];
> > >   if (currentTarget.Name.Equals(WildTarget) && _currentTarget != null)
{
> > >     currentTarget.Name = _currentTarget.Name;
> > >   }
> > >
> > >   _currentTarget = currentTarget;
> > >
> > >   // only execute targets that have not been executed already,
> > >   // if we are not forcing.
> > >   if(forceDependencies || !_currentTarget.Executed) {
> > >     _currentTarget.Execute();
> > >   }
> > > } while (!_currentTarget.Name.Equals(targetName));
> > >
> > > ... to
> > >
> > > do {
> > >   currentTarget = (Target) sortedTargets[currentIndex++];
> > >   if (currentTarget.Name.Equals(WildTarget) && CurrentTarget != null)
{
> > >     currentTarget.Name = CurrentTarget.Name;
> > >   }
> > >
> > >   _currentTarget = currentTarget;
> > >
> > >   // only execute targets that have not been executed already,
> > >   // if we are not forcing.
> > >   if(forceDependencies || !currentTarget.Executed) {
> > >     currentTarget.Execute();
> > >   }
> > > } while (!currentTarget.Name.Equals(targetName));
> > >
> > > Strange, isn't it?
> > >
> > > ...again, wild targets are nothing impressive, but I think
> > > they would be very helpful when writing gateway build files
> > > (no need of additional properties just to forward target names);
> > > furthermore, as already said, it would be possible to define
> > > a target that is executed when the user specifies a target
> > > that does not exist in the current build file...
> > >
> > > j3d.
> > >
> > > On Fri, 2004-03-05 at 20:50, Gert Driesen wrote:
> > > > Giuseppe,
> > > >
> > > > There appears to be a problem with your changes. Have you tried
applying
> > the
> > > > patch against NAnt cvs ?
> > > >
> > > > NAnt seem to get stuck in an infinite loop, I'll look into it if you
> > want
> > > > ...
> > > >
> > > > Regardless of this, I'd like to get feedback from other members of
the
> > > > community before committing your patch.  I don't mind committing the
new
> > > > target::get-current-target function, but I'm not sure about the
wildcard
> > > > target support ...
> > > >
> > > > Gert
> > > >
> > > > ----- Original Message ----- 
> > > > From: "Giuseppe Greco" <[EMAIL PROTECTED]>
> > > > To: "NAnt Developers" <[EMAIL PROTECTED]>
> > > > Sent: Thursday, March 04, 2004 5:02 PM
> > > > Subject: [nant-dev] Patch
> > > >
> > > >
> > > > > Hi all,
> > > > >
> > > > > attached to this email you will find the patch
> > > > > I promised yesterday.
> > > > >
> > > > > Now, it's up to you...
> > > > >
> > > > > j3d.
> > > > >
> > > > > -- 
> > > > > ----------------------------------------
> > > > > Giuseppe Greco
> > > > >
> > > > > ::agamura::
> > > > >
> > > > > phone:  +41 91 604 67 65
> > > > > mobile: +41 76 390 60 32
> > > > > email:  [EMAIL PROTECTED]
> > > > > web:    www.agamura.com
> > > > > ----------------------------------------
> > > > >
> > > -- 
> > > ----------------------------------------
> > > Giuseppe Greco
> > >
> > > ::agamura::
> > >
> > > phone:  +41 91 604 67 65
> > > mobile: +41 76 390 60 32
> > > email:  [EMAIL PROTECTED]
> > > web:    www.agamura.com
> > > ----------------------------------------
> > >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: IBM Linux Tutorials
> > Free Linux tutorial presented by Daniel Robbins, President and CEO of
> > GenToo technologies. Learn everything from fundamentals to system
> > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> > _______________________________________________
> > nant-developers mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/nant-developers
> -- 
> ----------------------------------------
> Giuseppe Greco
>
> ::agamura::
>
> phone:  +41 91 604 67 65
> mobile: +41 76 390 60 32
> email:  [EMAIL PROTECTED]
> web:    www.agamura.com
> ----------------------------------------
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> nant-developers mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-developers
>

Attachment: nantfileset.patch
Description: Binary data

Attachment: nanttask.patch
Description: Binary data

Reply via email to