You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Mark Fortner <ph...@gmail.com> on 2013/06/02 19:46:23 UTC

[VFS] Programmatically Determining Version Compatibility

I've been tinkering with yet another GUI for Commons VFS (hasn't everybody
at this point).  And I was wondering if there's a way to programmatically
determine whether or not a SPI is compatible with a specific version of the
API?  The idea is that a user would be able to safely install support for
one of the file systems.

My thought was that I could use a simple maven resolver to point to an
implementation on a maven repo, and download that JAR and it's dependencies
to a known location.  When you relaunch the browser, it would then add
those JARs to its classpath.

Admittedly, this is a half-baked idea, so I was wondering if anyone had any
similar thoughts, or if there were any VFS projects that have already
addressed this issue?

Cheers,

Mark

Re: [VFS] Programmatically Determining Version Compatibility

Posted by Gary Gregory <ga...@gmail.com>.
Hi Mark. The VFS project can only attest to following this guidelines
for itself. Other jars from other places, so it's up to them to decide
what to out in a manifest.

Gary

On Jun 3, 2013, at 15:32, Mark Fortner <ph...@gmail.com> wrote:

> Hi Gary,
> Thanks for the response.  I take it then that most of the plugin providers
> package their JARs with the appropriate Manifest data.  And I assume that
> if they don't, then the Package#getImplementationVersion method will return
> null.
>
> Cheers,
>
> Mark
>
>
>
> On Sun, Jun 2, 2013 at 3:01 PM, Gary Gregory <ga...@gmail.com> wrote:
>
>> On Jun 2, 2013, at 13:46, Mark Fortner <ph...@gmail.com> wrote:
>>
>>> I've been tinkering with yet another GUI for Commons VFS (hasn't
>> everybody
>>> at this point).  And I was wondering if there's a way to programmatically
>>> determine whether or not a SPI is compatible with a specific version of
>> the
>>> API?
>>
>>
>> Someclass.class.getPackage() gives you access to the info from the
>> manifest file, which includes the version.
>>
>> Gary
>>
>>> The idea is that a user would be able to safely install support for
>>> one of the file systems.
>>>
>>> My thought was that I could use a simple maven resolver to point to an
>>> implementation on a maven repo, and download that JAR and it's
>> dependencies
>>> to a known location.  When you relaunch the browser, it would then add
>>> those JARs to its classpath.
>>>
>>> Admittedly, this is a half-baked idea, so I was wondering if anyone had
>> any
>>> similar thoughts, or if there were any VFS projects that have already
>>> addressed this issue?
>>>
>>> Cheers,
>>>
>>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [VFS] Programmatically Determining Version Compatibility

Posted by Mark Fortner <ph...@gmail.com>.
Hi Gary,
Thanks for the response.  I take it then that most of the plugin providers
package their JARs with the appropriate Manifest data.  And I assume that
if they don't, then the Package#getImplementationVersion method will return
null.

Cheers,

Mark



On Sun, Jun 2, 2013 at 3:01 PM, Gary Gregory <ga...@gmail.com> wrote:

> On Jun 2, 2013, at 13:46, Mark Fortner <ph...@gmail.com> wrote:
>
> > I've been tinkering with yet another GUI for Commons VFS (hasn't
> everybody
> > at this point).  And I was wondering if there's a way to programmatically
> > determine whether or not a SPI is compatible with a specific version of
> the
> > API?
>
>
> Someclass.class.getPackage() gives you access to the info from the
> manifest file, which includes the version.
>
> Gary
>
> > The idea is that a user would be able to safely install support for
> > one of the file systems.
> >
> > My thought was that I could use a simple maven resolver to point to an
> > implementation on a maven repo, and download that JAR and it's
> dependencies
> > to a known location.  When you relaunch the browser, it would then add
> > those JARs to its classpath.
> >
> > Admittedly, this is a half-baked idea, so I was wondering if anyone had
> any
> > similar thoughts, or if there were any VFS projects that have already
> > addressed this issue?
> >
> > Cheers,
> >
> > Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Re: [VFS] Programmatically Determining Version Compatibility

Posted by Gary Gregory <ga...@gmail.com>.
On Jun 2, 2013, at 13:46, Mark Fortner <ph...@gmail.com> wrote:

> I've been tinkering with yet another GUI for Commons VFS (hasn't everybody
> at this point).  And I was wondering if there's a way to programmatically
> determine whether or not a SPI is compatible with a specific version of the
> API?


Someclass.class.getPackage() gives you access to the info from the
manifest file, which includes the version.

Gary

> The idea is that a user would be able to safely install support for
> one of the file systems.
>
> My thought was that I could use a simple maven resolver to point to an
> implementation on a maven repo, and download that JAR and it's dependencies
> to a known location.  When you relaunch the browser, it would then add
> those JARs to its classpath.
>
> Admittedly, this is a half-baked idea, so I was wondering if anyone had any
> similar thoughts, or if there were any VFS projects that have already
> addressed this issue?
>
> Cheers,
>
> Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org