Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-253

Not all packages from log4j-over-slf4j are exported in manifest

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • None
    • 1.6.x
    • log4j-over-slf4j
    • None
    • Operating System: All
      Platform: All

    Description

      log4j-over-slf4j contains this packages:

      • org.apache.log4j
      • org.apache.log4j.helpers
      • org.apache.log4j.spi
      • org.apache.log4j.xml

      but only exports org.apache.log4j (from [1]):

      Implementation-Title: log4j-over-slf4j
      Bundle-SymbolicName: log4j.over.slf4j
      Bundle-Name: log4j-over-slf4j
      Bundle-Vendor: SLF4J.ORG
      Export-Package: org.apache.log4j;version=${log4j.version}
      Import-Package: org.slf4j;version=${slf4j.api.minimum.compatible.version}, org.slf4j.helpers;version=${slf4j.api.minimum.compatible.version}, org.slf4j.spi;version=${slf4j.api.minimum.compatible.version}

      This creates problems in OSGi when some code uses classes from this packages.

      To fix this issues all packages should be exported. Manifest should look like this:

      Implementation-Title: log4j-over-slf4j
      Bundle-SymbolicName: log4j.over.slf4j
      Bundle-Name: log4j-over-slf4j
      Bundle-Vendor: SLF4J.ORG
      Export-Package: org.apache.log4j;version=${log4j.version},org.apache.log4j.helpers;version=${log4j.version},org.apache.log4j.spi;version=${log4j.version},org.apache.log4j.xml;version=${log4j.version}
      Import-Package: org.slf4j;version=${slf4j.api.minimum.compatible.version}, org.slf4j.helpers;version=${slf4j.api.minimum.compatible.version}, org.slf4j.spi;version=${slf4j.api.minimum.compatible.version}

      [1]: https://github.com/ceki/slf4j/blob/master/log4j-over-slf4j/src/main/resources/META-INF/MANIFEST.MF

      Attachments

        Activity

          People

            slf4j-dev SLF4J developers list
            ash2k Mikhail Mazursky
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: