ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@cortexebusiness.com.au>
Subject RE: multiple filesets in a task
Date Fri, 21 Sep 2001 03:07:55 GMT
> From: JohnA [mailto:john.mlist1@arrizza.com]
> 
> I am writing a taskdef that requires two FileSets. I need to distinguish
> between them. I am currently using the description= attribute. I 
> do not want
> to get into using position i.e. the first fileset vs the second fileset.
> 
> Is there a better technique?
> 

Yes, use different addXXX methods to add the filesets

public void addXFileset(Fileset fs) {
...
}

and 

public void addYFileset(Fileset fs) {
...
}

Then you have

<mytask>
   <xfileset ...>
   <yfileset ...>
</mytask>

Have a look at the war task in Ant for an example of this in practice.

Conor


Mime
View raw message