ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Holger Engels <heng...@mercatis.de>
Subject [PATCH] ant task with (nested) fileset(s)
Date Fri, 09 Nov 2001 10:40:25 GMT
On Fri, 9 Nov 2001, Holger Engels wrote:

> On Fri, 9 Nov 2001, Jose Alberto Fernandez wrote:
> 
> > From: "Stefan Bodewig" <bodewig@apache.org>
> > 
> > > On Thu, 8 Nov 2001, Holger Engels <hengels@mercatis.de> wrote:
> > > 
> > > > Did you ever think about making the ant task a directory based task?
> > > 
> > > Yes, we called it <anton> 8-)
> > > 
> > > It's on the list of things to do.
> > > 
> > 
> > The point that I think is relevant is that it may be no need to add a new task
> > we could just add a <antfileset> element to <ant> that can be used instead.
> > 
> > This would not imply any backward compatibility issue or any other problem
> > as far as I can see and keep the number of different tasks to maintain low.
> > 
> 

I just implemented ant as a matching task with support for nested 
filesets. Assuming, that the current directory contains sub1.xml and 
sub2.xml, the following three blocks have the same effect:

    <ant target="main">
      <include name="sub*"/>
    </ant>


    <ant target="main">
      <fileset dir=".">
        <include name="sub1.xml"/>
      </fileset>
    </ant>


    <ant antfile="sub1.xml" target="main"/>
    <ant antfile="sub2.xml" target="main"/>

'dir' acts as the basedir for the matching task's fileset, if 
(in|ex)cludes(file)? has been provided. 'antfile' or it's default 
"build.xml" are added to the matching tasks includes if no other includes 
/ excludes have been specified and no nested filesets do exist.

The task should be fully backwards compatible .. can you confirm that?
Please check the recurring initialization of 'newProject'. Do I 
reinitialize to much / less?

Cheers,


Holger

Mime
View raw message