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

Ceki Gulcu ceki at qos.ch
Fri Feb 26 10:20:53 UTC 2016


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
>


More information about the slf4j-user mailing list