You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Emmanuel Bourg <eb...@micropole-univers.com> on 2004/05/19 12:43:45 UTC
[vfs] classpath provider
Hi, I started looking at vfs and tried to implement a classpath provider
that may be used in a future version of [configuration]. I'm not sure I
did it right but the test case seems to work well. I just copied the
UrlFileProvider and adapted it to get the url from the
ClassLoader.getResource() method.
Emmanuel Bourg
Re: [vfs] classpath provider
Posted by Mario Ivankovits <im...@apache.org>.
Mario Ivankovits wrote:
> However, i currently found that resolving a resource which is found
> inside an jar might not work anyway, still have to look into this.
Now it should work!!
Ciao,
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [vfs] classpath provider
Posted by Mario Ivankovits <im...@apache.org>.
Emmanuel Bourg wrote:
> 'm not sure I did it right but the test case seems to work well. I
> just copied the UrlFileProvider and adapted it to get the url from the
> ClassLoader.getResource() method.
Creating a new filesystem but delegating to another one breaks the
current test-cases.
Some internal tests failed and until i dont know better, i dont want to
adjust the test-case. I treat them as a bible - what they say is fact :-)
I found a solution by adding the scheme "res" to the UrlFileProvider too
and explicity query this prefix during the resolveFile process.
Using UrlFileSystemConfigBuilder you could set the classloader to use.
Syntax:
res:META-INF/LICENSE.txt
However, i currently found that resolving a resource which is found
inside an jar might not work anyway, still have to look into this.
-- Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [vfs] classpath provider
Posted by Mario Ivankovits <im...@apache.org>.
Emmanuel Bourg wrote:
> I'm not sure I did it right but the test case seems to work well.
I have to tell you, that the ResourceFileProvider wont work currently.
In your testcase you added the provider to scheme "res" but you dont
prefixed the resolveFile with "res".
And it looks like there is a major bug in the Url* implementation - with
my current knowledge i have to say, that it wont be really used -
sometimes vfs fallback from the url-provider to file-provider.
But i am in the mid of analyzing this thing, and it is too late today.
So it might take some time until i have analyzed what is wrong and how
to fix.
Maybe the end is a fix for Anthonys problem too, he already tried to
tell me that the url stuff seems not to work correctly.
-- Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [vfs] classpath provider
Posted by Mario Ivankovits <ma...@ops.co.at>.
Emmanuel Bourg wrote:
> Hi, I started looking at vfs and tried to implement a classpath
> provider that may be used in a future version of [configuration].
Nice idea - i will commit it asap, but please could you post this to
bugzilla too. http://issues.apache.org/bugzilla/enter_bug.cgi
I dont want to fret (what a funny word :-)) you, but this is simply how
it should be done.
Thank you!
-- Mario