You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Laci Gaspar <la...@gmail.com> on 2015/05/05 10:18:18 UTC

Re: wiring

Hi
there's still something I don't understand.
In my pom of bundle A, I have the following now:

     <Import-Package>
         ch.curabill*;version=${project.version},
         *
     </Import-Package>

After installing bundle A Version 1.4.2-SNAPSHOT, I do a imports <bundle 
A id>, and I get
...
MspServiceMessages (964): ch.curabill.msp.service; version=1.5.2.SNAPSHOT
...

The bundle MspServiceMessages is installed in versions 1.4.2-SNAPSHOT 
and 1.5.2.SNAPSHOT.

Why is bundle A wired with bundle MspServiceMessages, version 
1.5.2.SNAPSHOT???

thanks for your help,
Laci

On 10.04.2015 13:07, Jamie G. wrote:
> No problem :)
>
> You might enjoy looking through the code examples from the Apache
> Karaf Cookbook:
> https://github.com/jgoodyear/ApacheKarafCookbook
>
> Full disclosure, i worked on that book - but the sample code is freely
> available on github, so have a look - might help jump start your
> development.
>
> Cheers,
> Jamie
>


Re: wiring

Posted by Laci Gaspar <la...@gmail.com>.
Hi

I figured it out. It's because I didn't specify a range of versions. 
Just version=${project.version}.
In that case the upper boundery of the versions is interpreted as infinite.

thanks for your help.
Laci

On 05.05.2015 20:45, chris.gray@kiffer.ltd.uk wrote:
> The wiring depends on the headers in your bundle's manifest.  If they say
> for example to import ch.curabill.msp.service version 1.4.2 (inclusive) to
> version 2.0.0 (exclusive) then the framework is perfectly entitled to wire
> it to 1.5.2 and indeed it should be congratulated for doing so if this
> reduces the number of versions of ch.curabill.msp.service installed (for
> example because another bundle insisted on >=1.5).
>
> The first step is to look in the manifest to see what the Import-Package:
> header says, and the second is maybe to figure out just *why* it says
> that. Generally the minimum version would be the version your bundle was
> compiled against, up to but not including the next "major" version.
>
>> Hi
>> there's still something I don't understand.
>> In my pom of bundle A, I have the following now:
>>
>>       <Import-Package>
>>           ch.curabill*;version=${project.version},
>>           *
>>       </Import-Package>
>>
>> After installing bundle A Version 1.4.2-SNAPSHOT, I do a imports <bundle
>> A id>, and I get
>> ...
>> MspServiceMessages (964): ch.curabill.msp.service; version=1.5.2.SNAPSHOT
>> ...
>>
>> The bundle MspServiceMessages is installed in versions 1.4.2-SNAPSHOT
>> and 1.5.2.SNAPSHOT.
>>
>> Why is bundle A wired with bundle MspServiceMessages, version
>> 1.5.2.SNAPSHOT???
>>
>> thanks for your help,
>> Laci
>>
>> On 10.04.2015 13:07, Jamie G. wrote:
>>> No problem :)
>>>
>>> You might enjoy looking through the code examples from the Apache
>>> Karaf Cookbook:
>>> https://github.com/jgoodyear/ApacheKarafCookbook
>>>
>>> Full disclosure, i worked on that book - but the sample code is freely
>>> available on github, so have a look - might help jump start your
>>> development.
>>>
>>> Cheers,
>>> Jamie
>>>
>>
>


Re: wiring

Posted by ch...@kiffer.ltd.uk.
The wiring depends on the headers in your bundle's manifest.  If they say
for example to import ch.curabill.msp.service version 1.4.2 (inclusive) to
version 2.0.0 (exclusive) then the framework is perfectly entitled to wire
it to 1.5.2 and indeed it should be congratulated for doing so if this
reduces the number of versions of ch.curabill.msp.service installed (for
example because another bundle insisted on >=1.5).

The first step is to look in the manifest to see what the Import-Package:
header says, and the second is maybe to figure out just *why* it says
that. Generally the minimum version would be the version your bundle was
compiled against, up to but not including the next "major" version.

> Hi
> there's still something I don't understand.
> In my pom of bundle A, I have the following now:
>
>      <Import-Package>
>          ch.curabill*;version=${project.version},
>          *
>      </Import-Package>
>
> After installing bundle A Version 1.4.2-SNAPSHOT, I do a imports <bundle
> A id>, and I get
> ...
> MspServiceMessages (964): ch.curabill.msp.service; version=1.5.2.SNAPSHOT
> ...
>
> The bundle MspServiceMessages is installed in versions 1.4.2-SNAPSHOT
> and 1.5.2.SNAPSHOT.
>
> Why is bundle A wired with bundle MspServiceMessages, version
> 1.5.2.SNAPSHOT???
>
> thanks for your help,
> Laci
>
> On 10.04.2015 13:07, Jamie G. wrote:
>> No problem :)
>>
>> You might enjoy looking through the code examples from the Apache
>> Karaf Cookbook:
>> https://github.com/jgoodyear/ApacheKarafCookbook
>>
>> Full disclosure, i worked on that book - but the sample code is freely
>> available on github, so have a look - might help jump start your
>> development.
>>
>> Cheers,
>> Jamie
>>
>
>