I thought for myself to create a <scriptselector> where you simply 
implement the isSelected() method.

Base should be the BaseExtendSelector and the script gets
basedir, filename and file (the arguments of isSelected()) as
populated variables.

<fileset>
    <scriptselector language="javascript">
        return file.canWrite();
    </scriptselector>
</fileset>


Jan



> -----Original Message-----
> From: Peter Reilly [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 12, 2004 2:15 PM
> To: Ant Developers List
> Subject: Re: Poor support for selectors
> 
> 
> If you use beanshell 2.0x (which you do!), you can use
> a normal script task to create a selector.
> 
> Peter
> Jose Alberto Fernandez wrote:
> 
> >I need to construct a fileset using rules a little bit out of the
> >ordinary
> >and I an having a very hard time trying to do it in ANT.
> >
> >What I need is to be able to match filenames using egexp 
> rules for the
> >filename.
> >The only regexp things we have for selectors looks at the 
> content of the
> >file,
> >and the only things to select of filenames, use ANT's filename
> >expressions.
> >
> >We do not provide either a scriptselector (like we provide a script
> >filter)
> >neither. 
> >
> >Shall we try to close some of this gaps in 1.6.x? Or shall 
> we wait for
> >1.7 and the new role based code.
> >
> >I think one thing we should do in 1.7 is take a look at the 
> all the core
> >features: filters, mappers, selectors, conditions, etc. And 
> make sure we
> >provide simillar strength across the board (by prviding scriptXXX for
> >all) at a minimum.
> >
> >Comments?
> >
> >Jose Alberto
> >
> >
> >
> >  
> >
> >-------------------------------------------------------------
> -----------
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Reply via email to