Skip to content

Commit

Permalink
[LOGBACK-1736] Make OSGi S.L.M. requirement for Configurator optional
Browse files Browse the repository at this point in the history
For LOGBACK-1729 (https://jira.qos.ch/browse/LOGBACK-1729) the OSGi
Service Loader Mediator Manifest entries were enhanced to be able to
load logback Configurator services provided by other OSGi bundles.
Unintentionally this requirement was only specified with
'cardinality:=multiple' and without 'resolution:=optional', which means
that at least one bundle providing a Configurator service is required
(but more are possible).

This adds the forgotten 'resolution:=optional' directive to also allow
the logback-classic bundle to resolve if no Configurator service is
available, which is a valid case and for what the code is prepared.

Fixes https://jira.qos.ch/browse/LOGBACK-1736

Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net>
  • Loading branch information
HannesWell authored and ceki committed Apr 25, 2023
1 parent 24a0997 commit 5c4fd50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions logback-classic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,9 @@
</Import-Package>
<!-- Needed to integrate ServiceLoader mechanism with OSGi -->
<Require-Capability><![CDATA[
osgi.extender;filter:="(&(osgi.extender=osgi.serviceloader.processor)(version>=1.0.0)(!(version>=2.0.0)))",
osgi.extender;filter:="(&(osgi.extender=osgi.serviceloader.processor)(version>=1.0.0)(!(version>=2.0.0)))";resolution:=optional,
osgi.extender;filter:="(&(osgi.extender=osgi.serviceloader.registrar)(version>=1.0.0)(!(version>=2.0.0)))",
osgi.serviceloader;filter:="(osgi.serviceloader=ch.qos.logback.classic.spi.Configurator)";osgi.serviceloader="ch.qos.logback.classic.spi.Configurator";cardinality:=multiple
osgi.serviceloader;filter:="(osgi.serviceloader=ch.qos.logback.classic.spi.Configurator)";osgi.serviceloader="ch.qos.logback.classic.spi.Configurator";resolution:=optional;cardinality:=multiple
]]></Require-Capability>
<Provide-Capability><![CDATA[
osgi.service;objectClass:List<String>="jakarta.servlet.ServletContainerInitializer";effective:=active,
Expand Down

0 comments on commit 5c4fd50

Please sign in to comment.