[slf4j-user] slf4j-api, OSGi and BndTools in Eclipse

Roberto Pierpaoli roberto at iooota.com
Fri Feb 26 17:32:14 UTC 2016


Hi Ceki,

thanks a lot, I have read my own previous message and actually it does not
make much sense... even to myself :)

I was confused, the manifest is absolutely correct, sorry.

Kind regards,


Roberto

2016-02-26 11:20 GMT+01:00 Ceki Gulcu <ceki at qos.ch>:

>
> Ho Roberto,
>
> The contents of slf4j-api/src/main/resources/META-INF/MANIFEST.MF
>
> Export-Package: org.slf4j;version=${parsedVersion.osgiVersion},
>   org.slf4j.spi;version=${parsedVersion.osgiVersion},
>   org.slf4j.helpers;version=${parsedVersion.osgiVersion},
>   org.slf4j.event;version=${parsedVersion.osgiVersion}
> Import-Package:
> org.slf4j.impl;version=${slf4j.api.minimum.compatible.version} is the
> current version.
>
> The org.slf4j.impl;version could be any version in the 1.6.x and 1.7.x
> series.
>
> --
> Ceki
>
> where ${slf4j.api.minimum.compatible.version} is 1.6.0 and
>
>
> On 2/26/2016 10:44, Roberto Pierpaoli wrote:
>
>> Hi,
>>
>> I'm using slf4j-api v.1.7.16 in one of my OSGi-based projects: BndTools
>> is an Eclipse Plugin that I use for rapid testing (it handles many OSGi
>> implementations, really easying the procedure of deploying the code into
>> them and launching the runtime).
>>
>> Before launching the runtime, BndTools performs an auto-resolve routine
>> to pre-populate the environment with all the needed JARs: in my case it
>> resolves slf4j-api v.1.7.16 as requested by my code, but **also
>> slf4j-api v.1.6.2 as requested by slf4j-api v.1.7.16 itself**...
>>
>> When running the runtime, an error occurs, since 2 JARs are found
>> exposing the same packages and this is ambiguous inside an OSGi
>> environment.
>>
>> Exploring the JARs I have noticed that slf4j-api v1.7.16 declares an
>> explicit dependency its manifest towards the following package:
>>
>> Import-Package: org.slf4j.impl;version=1.6.0
>>
>> is this normal?
>>
>> May be this the reason why also slf4j-api v.1.6.2 is resolved by
>> BndTools and thus both the JARs are included?
>>
>> Thanks for any contribution,
>>
>>
>> Roberto
>>
>>
>> _______________________________________________
>> slf4j-user mailing list
>> slf4j-user at qos.ch
>> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>>
>> _______________________________________________
> slf4j-user mailing list
> slf4j-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/slf4j-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20160226/b941632f/attachment.html>


More information about the slf4j-user mailing list