Skip to content

Commit b363bb3

Browse files
HannesWellceki
authored andcommitted
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>
1 parent 2235d3c commit b363bb3

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pom.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@
3434

3535
<properties>
3636
<!-- yyyy-MM-dd'T'HH:mm:ss'Z' -->
37-
<project.build.outputTimestamp>2022-12-12T19:19:39Z</project.build.outputTimestamp>
38-
<latest.stable.version>1.7.36</latest.stable.version>
39-
<latest.2.version>2.0.0-alpha7</latest.2.version>
37+
<project.build.outputTimestamp>2022-12-12T19:19:39Z</project.build.outputTimestamp>
38+
<latest.1.version>1.7.36</latest.1.version>
4039
<!-- java.util.ServiceLoader requires Java 6 -->
4140
<jdk.version>8</jdk.version>
4241
<maven.compiler.source>${jdk.version}</maven.compiler.source>

slf4j-api/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@
5959
<configuration>
6060
<instructions>
6161
<Import-Package>org.slf4j.spi;version="${range;[===,+);${version;===;${maven_version;${project.version}}}}"</Import-Package>
62+
<!-- 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 -->
63+
<_exportcontents><![CDATA[
64+
*,\
65+
org.slf4j;uses:="org.slf4j.event,org.slf4j.helpers,org.slf4j.spi";version="${latest.1.version}"
66+
]]></_exportcontents>
6267
<Require-Capability><![CDATA[
6368
osgi.extender;filter:="(&(osgi.extender=osgi.serviceloader.processor)(version>=1.0.0)(!(version>=2.0.0)))",
6469
osgi.serviceloader;filter:="(osgi.serviceloader=org.slf4j.spi.SLF4JServiceProvider)";osgi.serviceloader="org.slf4j.spi.SLF4JServiceProvider"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy