commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rami Ojares" <>
Subject Re: [vfs] VfsTask
Date Mon, 21 Jun 2004 15:46:57 GMT

> What of your toolbox component do need the filesystemmanager?
> I looked into them, but they only use the passed fileobjects.

Yeah, that was more like a "what if" question :)

> I like the idea of the current ant task implementation, they instantiate 
> their own manager in the context of the current ant project.


> I am not sure if we should use the static way (VFS.getManager()) as this 
> might have bad sideeffects when using ant embedded.


> If the user use VFS.getManager() too and we close this instance after 
> ant is done, we close this manager (and all open files) too (it is the 
> same manager instance).
> Also we can not simply use setLogger() on this instance, there might 
> already be another logger set by the user on this instance (in the 
> embedded case)


However I need to get AntLogger in FileSet and I need to resolve files there.

So there are 2 options.
- Duplicating VfsTask to VfsDataType
- separating AntLogger as shown and making resolveFile method to
resolveFile(Project p, String uri)
> Might it be possible to implement a special ant task - say
> <vfs-manager id="vfs" class="StandardFileSystemManager" />
> this allows us to add some configuration options later (e.g. proxy 
> settings, ssh settings) using this task and refer to this instance 
> within the other tasks and maybe from within DataType (FileSet)
> Maybe a construct like
> <vfs-manager id="vfs" class="global" />
> could be possible which will use the VFS.getManager().
> And when using ant embedded, the developer could "inject" the manager 
> instance.
> Not sure if all this could work, as i havent written an ant task till now.
> Do you think this could be an option?

I don't understand fully but I quess you want a way to configure the manager
in ant for different tasks. This could be a DataType.


<vfs-copy toDir="path">
	<vfs-manager proxy="foo" replicator="bar"/>
	<vfs-fileset dir="path">
		<include name="*.b?t"/>

And then a task could support the datatype and use a filemanager
with given configuration.

- rami

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message