ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <anto...@antbuild.com>
Subject Re: DO NOT REPLY [Bug 26511] - Add IFileSet interface
Date Thu, 29 Jan 2004 08:36:22 GMT
Nick Chalko wrote:

> bugzilla@apache.org wrote:
>
>
>> I don´t know ruper. But "autodownload and cache resources" via 
>> fileset? A fileset lists per definition only present files ... why 
>> download present files?
>>
>>  
>>
> Here is a sample of what I want to achieve. <ruperset id="test1">
>            <resource name="log4j" version="1.2" repository="maven"/>
>        </ruperset>
>        <copy toDir="${test.dir}">
>            <fileset refid="test1"/>
>        </copy>
>
> If ruper has a copy of log4j version 1.2 then good, if not download 
> and store localy,  in all cases the fileset with refid="test1"    
> would return  
> <mylocal-jar-dir>/org.apache.jakarta/log4j/jars/log4j-1.2.jar  
> However I seem to have error already
> Copy doesn't like
> public void addFileset(IFileSet set) {
>        filesets.addElement(set);
>    }
>
> It says The <copy> type doesn't support the nested "fileset" element.
>
> So I will need to investigate some more. It does seem that FileSet is 
> a heavy. It seems to me that the base type for FileSet   sould only 
> have then method
> publid File[] getFiles()
>
> I will take a look at selectors.
>
> R,
> Nick
>
Hi Nick,

the Resource class is an attempt to abstract the files. But it is only 
used with plain files and with zip entries in the Zip task and its 
children (Jar, War, Ear).

One option would be to develop this kind of functionality in the vfs 
sandbox of jakarta. It might be more powerful than the present Resource 
class.

Then one would have to imagine a way to use vfs objects in the ant core 
tasks, probably via an interface which some selectors would implement.

Just an idea though, I have unfortunately little time to invest on this 
at present.

Antoine

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message