[
https://issues.apache.org/jira/browse/LOGGING-190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17828017#comment-17828017
]
Johan Compagner commented on LOGGING-190:
-----------------------------------------
i would be fine doing that but i am not sure how the manifest is created (i
don't see for example bnd is used and so on)
also i can't directly find thing of osgi that is already in it. for example:
[commons-logging/src/conf/MANIFEST.MF at master · apache/commons-logging
(github.com)|https://github.com/apache/commons-logging/blob/master/src/conf/MANIFEST.MF]
but i do see that [~HannesWellmann] did a commit yesterday for osgi:
[[LOGGING-189] Add optional import for package org.slf4j.spi (#232) ·
apache/commons-logging@57d09eb
(github.com)|https://github.com/apache/commons-logging/commit/57d09eb9fccfd6bd11688ee3a55a161f55944e84]
so i am quite sure that Hannes knows this and can fix this easily ;)
> ServiceLoader with OSGi improvements (so commons can be used in an OSGi
> environment)
> ------------------------------------------------------------------------------------
>
> Key: LOGGING-190
> URL: https://issues.apache.org/jira/browse/LOGGING-190
> Project: Commons Logging
> Issue Type: Improvement
> Affects Versions: 1.3.0
> Reporter: Johan Compagner
> Priority: Major
>
> Log4j JCL bridge already has the correct osgi stuff in the manifest to create
> the bridge in an OSGi environment for example Eclipse
>
> But commons logging does mis a bit, it only has:
> Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
>
> but that should be:
>
> Require-Capability: osgi.extender;filter:="(&(osgi.extender=osgi.service
> loader.processor)(version>=1.0.0)(!(version>=2.0.0)))",osgi.serviceload
> er;filter:="(osgi.serviceloader=org.apache.commons.logging.LogFactory)";os
> gi.serviceloader="org.apache.commons.logging.LogFactory",osgi.ee;filter:="
> (&(osgi.ee=JavaSE)(version=1.8))"
>
> so that it hooks up with for example what is specified in the jcl bindings of
> log4j-jcl which defines this:
>
> Provide-Capability: osgi.service;objectClass:List<String>="org.apache.co
> mmons.logging.LogFactory";effective:=active,osgi.serviceloader;osgi.ser
> viceloader="org.apache.commons.logging.LogFactory";register:="org.apach
> e.logging.log4j.jcl.LogFactoryImpl"
> Require-Capability: osgi.extender;filter:="(&(osgi.extender=osgi.service
> loader.registrar)(version>=1.0.0)(!(version>=2.0.0)))";resolution:=opti
> onal,osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
>
> So could the thing above be added to the build so it has the correct osgi
> registration stuff?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)