You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Ian Boston <ie...@tfd.co.uk> on 2012/02/09 01:23:50 UTC

Launchpad plugin, multiple bundle versions.

Hi,
Should the launchpad pluging be able to plackage multiple versions of
the same jar ?
The current BND tool has become quite expressive on version ranges for
major numbers (correctly[1]), but where 2 versions of the same jar can
exist in an OSGi container[2], the launchpad plugin doesn't appear to
allow that to happen.

In my list.xml I have

        <bundle>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.1</version>
        </bundle>
        <bundle>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.4</version>
        </bundle>

But only 1.4 gets packaged.

Ian

1. Some jars like Guava state no guarente of computability between
major version numbers.
2. Some jars do things like start background management threads, so it
might be dangerous to have 2 versions.

Re: Launchpad plugin, multiple bundle versions.

Posted by Carsten Ziegeler <cz...@apache.org>.
The new commons libs are unfortunately not compatible to the old ones
but use the same symbolic name. So far, we created wrapper bundles
which use a different symbolic name for one of them to avoid this
problem.

Regards
Carsten

2012/2/9 Ian Boston <ie...@tfd.co.uk>:
> Ok, no worries.
> Thanks
> Ian
>
> On 9 February 2012 13:32, Justin Edelson <ju...@justinedelson.com> wrote:
>> No, this is not supported. The second version overrides the first. I
>> supposed we could add some extra metadata to the second item to
>> indicate that it was not supposed to replace the first item, but I
>> doubt we could figure this out automagically.
>>
>> Justin
>>
>> On Wed, Feb 8, 2012 at 7:23 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>>> Hi,
>>> Should the launchpad pluging be able to plackage multiple versions of
>>> the same jar ?
>>> The current BND tool has become quite expressive on version ranges for
>>> major numbers (correctly[1]), but where 2 versions of the same jar can
>>> exist in an OSGi container[2], the launchpad plugin doesn't appear to
>>> allow that to happen.
>>>
>>> In my list.xml I have
>>>
>>>        <bundle>
>>>            <groupId>commons-io</groupId>
>>>            <artifactId>commons-io</artifactId>
>>>            <version>2.1</version>
>>>        </bundle>
>>>        <bundle>
>>>            <groupId>commons-io</groupId>
>>>            <artifactId>commons-io</artifactId>
>>>            <version>1.4</version>
>>>        </bundle>
>>>
>>> But only 1.4 gets packaged.
>>>
>>> Ian
>>>
>>> 1. Some jars like Guava state no guarente of computability between
>>> major version numbers.
>>> 2. Some jars do things like start background management threads, so it
>>> might be dangerous to have 2 versions.



-- 
Carsten Ziegeler
cziegeler@apache.org

Re: Launchpad plugin, multiple bundle versions.

Posted by Ian Boston <ie...@tfd.co.uk>.
Ok, no worries.
Thanks
Ian

On 9 February 2012 13:32, Justin Edelson <ju...@justinedelson.com> wrote:
> No, this is not supported. The second version overrides the first. I
> supposed we could add some extra metadata to the second item to
> indicate that it was not supposed to replace the first item, but I
> doubt we could figure this out automagically.
>
> Justin
>
> On Wed, Feb 8, 2012 at 7:23 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>> Hi,
>> Should the launchpad pluging be able to plackage multiple versions of
>> the same jar ?
>> The current BND tool has become quite expressive on version ranges for
>> major numbers (correctly[1]), but where 2 versions of the same jar can
>> exist in an OSGi container[2], the launchpad plugin doesn't appear to
>> allow that to happen.
>>
>> In my list.xml I have
>>
>>        <bundle>
>>            <groupId>commons-io</groupId>
>>            <artifactId>commons-io</artifactId>
>>            <version>2.1</version>
>>        </bundle>
>>        <bundle>
>>            <groupId>commons-io</groupId>
>>            <artifactId>commons-io</artifactId>
>>            <version>1.4</version>
>>        </bundle>
>>
>> But only 1.4 gets packaged.
>>
>> Ian
>>
>> 1. Some jars like Guava state no guarente of computability between
>> major version numbers.
>> 2. Some jars do things like start background management threads, so it
>> might be dangerous to have 2 versions.

Re: Launchpad plugin, multiple bundle versions.

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

Also, while the OSGi spec would allow two bundles with the same symbolic name but different versions to be installed, it easy to break this setup if export and import versions are not properly specified.

Therefore all tooling coming out fo Sling (JCR/OSGi Installer and Web Console) don't support this. In fact there is a package admin plugin for the Web Console which can be used to report duplicate exports of the same package in a framework because we ran into class space consistency issues between bundles declaring proper imports and bundles not declaring them properly.

Regards
Felix

Am 09.02.2012 um 03:32 schrieb Justin Edelson:

> No, this is not supported. The second version overrides the first. I
> supposed we could add some extra metadata to the second item to
> indicate that it was not supposed to replace the first item, but I
> doubt we could figure this out automagically.
> 
> Justin
> 
> On Wed, Feb 8, 2012 at 7:23 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>> Hi,
>> Should the launchpad pluging be able to plackage multiple versions of
>> the same jar ?
>> The current BND tool has become quite expressive on version ranges for
>> major numbers (correctly[1]), but where 2 versions of the same jar can
>> exist in an OSGi container[2], the launchpad plugin doesn't appear to
>> allow that to happen.
>> 
>> In my list.xml I have
>> 
>>        <bundle>
>>            <groupId>commons-io</groupId>
>>            <artifactId>commons-io</artifactId>
>>            <version>2.1</version>
>>        </bundle>
>>        <bundle>
>>            <groupId>commons-io</groupId>
>>            <artifactId>commons-io</artifactId>
>>            <version>1.4</version>
>>        </bundle>
>> 
>> But only 1.4 gets packaged.
>> 
>> Ian
>> 
>> 1. Some jars like Guava state no guarente of computability between
>> major version numbers.
>> 2. Some jars do things like start background management threads, so it
>> might be dangerous to have 2 versions.


Re: Launchpad plugin, multiple bundle versions.

Posted by Justin Edelson <ju...@justinedelson.com>.
No, this is not supported. The second version overrides the first. I
supposed we could add some extra metadata to the second item to
indicate that it was not supposed to replace the first item, but I
doubt we could figure this out automagically.

Justin

On Wed, Feb 8, 2012 at 7:23 PM, Ian Boston <ie...@tfd.co.uk> wrote:
> Hi,
> Should the launchpad pluging be able to plackage multiple versions of
> the same jar ?
> The current BND tool has become quite expressive on version ranges for
> major numbers (correctly[1]), but where 2 versions of the same jar can
> exist in an OSGi container[2], the launchpad plugin doesn't appear to
> allow that to happen.
>
> In my list.xml I have
>
>        <bundle>
>            <groupId>commons-io</groupId>
>            <artifactId>commons-io</artifactId>
>            <version>2.1</version>
>        </bundle>
>        <bundle>
>            <groupId>commons-io</groupId>
>            <artifactId>commons-io</artifactId>
>            <version>1.4</version>
>        </bundle>
>
> But only 1.4 gets packaged.
>
> Ian
>
> 1. Some jars like Guava state no guarente of computability between
> major version numbers.
> 2. Some jars do things like start background management threads, so it
> might be dangerous to have 2 versions.