mirror of https://github.com/qos-ch/slf4j
SLF4J-579: Export client packages of slf4j-api in version 1
Fixes https://jira.qos.ch/browse/SLF4J-576 This allows to use the slf4j-api version 2 artifact as drop-in replacement for slf4j-api version 1 in OSGi environments as well. slf4j-api can now be wired to bundles that require packages of slf4j-api in version 1 or 2. Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net>
This commit is contained in:
parent
2235d3c698
commit
b363bb31ed
5
pom.xml
5
pom.xml
|
|
@ -34,9 +34,8 @@
|
|||
|
||||
<properties>
|
||||
<!-- yyyy-MM-dd'T'HH:mm:ss'Z' -->
|
||||
<project.build.outputTimestamp>2022-12-12T19:19:39Z</project.build.outputTimestamp>
|
||||
<latest.stable.version>1.7.36</latest.stable.version>
|
||||
<latest.2.version>2.0.0-alpha7</latest.2.version>
|
||||
<project.build.outputTimestamp>2022-12-12T19:19:39Z</project.build.outputTimestamp>
|
||||
<latest.1.version>1.7.36</latest.1.version>
|
||||
<!-- java.util.ServiceLoader requires Java 6 -->
|
||||
<jdk.version>8</jdk.version>
|
||||
<maven.compiler.source>${jdk.version}</maven.compiler.source>
|
||||
|
|
|
|||
|
|
@ -59,6 +59,11 @@
|
|||
<configuration>
|
||||
<instructions>
|
||||
<Import-Package>org.slf4j.spi;version="${range;[===,+);${version;===;${maven_version;${project.version}}}}"</Import-Package>
|
||||
<!-- Export the client/user package of slf4j-api version 1 to make the slf4j-api bundle in version 2 usable for bundles that only import slf4j-1.x -->
|
||||
<_exportcontents><![CDATA[
|
||||
*,\
|
||||
org.slf4j;uses:="org.slf4j.event,org.slf4j.helpers,org.slf4j.spi";version="${latest.1.version}"
|
||||
]]></_exportcontents>
|
||||
<Require-Capability><![CDATA[
|
||||
osgi.extender;filter:="(&(osgi.extender=osgi.serviceloader.processor)(version>=1.0.0)(!(version>=2.0.0)))",
|
||||
osgi.serviceloader;filter:="(osgi.serviceloader=org.slf4j.spi.SLF4JServiceProvider)";osgi.serviceloader="org.slf4j.spi.SLF4JServiceProvider"
|
||||
|
|
|
|||
Loading…
Reference in New Issue