This ensures that there is only a single source for OSGi metadata.
Additionally this improves the metadata for some Export-Package entries.
Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net>
Only use the maven-bundle-plugin to generate all OSGi metadata into
slf4j's Manifest.MF files. This unifies the resulting MANIFEST.MFs
that are currently partly generated and partly statically defined and
fixes the following aspects:
- Fix the package-export of slf4j-jdk-platform-logging (from
'slf4j.jdk.platform.logging' to 'org.slf4j.jdk.platform.logging')
- Import missing packages for slf4j-reload4j and log4j-over-slf4j
- Replace the deprecated 'Bundle-RequiredExecutionEnvironment' by a
corresponding required 'osgi.ee' capability
- Restores the exported packages of jcl-over-slf4j
Fixes https://jira.qos.ch/browse/SLF4J-578
Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net>
Since slf4j 2 Bindings are now called Providers. The corresponding Maven
project names and descriptions should be adapted accordingly.
Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net>
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>
* Improve generated OSGi metadata and restore Bundle-SymbolicName
Enhance the generated OSGi metadata for all slf4j-modules in the
following ways:
- Restore the Bundle-SymbolicName, Bundle-Name, Bundle-Vendor and
Bundle-DocURL from SLF4J-2.0.5 and before
- Removes Export-Package: META-INF.versions.9
- Removes self-Imports of exported package (has to be added again in a
follow up, where desired)
- Remove unnecessary BND-internal headers
Additionally move the maven-bundle-plugin configuration from the
execution configuration up into the configuration of the plugin so that
it can be easier overwritten in child-modules.
Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net>
* Automate OSGi metadata creation and restore package-exports of slf4j-api
Only use the maven-bundle-plugin to generate all OSGi metadata into
slf4j-api's Manifest.MF file. This unifies the resulting MANIFEST.MFs
that are currently partly generated and partly statically defined.
Furthermore it fixes the following flaws in the currently generated OSGi
metadata of slf4j-api:
- Import only the exported org.slf4j.spi package (like in slf4j 2.0.5
and before)
- Replace the deprecated 'Bundle-RequiredExecutionEnvironment' header by
a corresponding required 'osgi.ee' capability
Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net>
---------
Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net>
Fixes: https://jira.qos.ch/browse/SLF4J-574
This uses the BND tool, via org.apache.felix to generate
the MANIFEST.MF to be fully compliant with OSGi.
Compared to using just the maven-jar-plugin to create
the MANIFEST.MF the uses clauses are added to the
Export-Package
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
If both the servlet container and a web application use SLF4J,
`ServiceLoader` calls are susceptible to three problems:
1. The SLF4J copy in the webapp detects the common providers by can not
instantiate them (they implement a different copy of
`SLF4JProviderService`),
2. The SLF4J copy in the common classloader can bind the providers in
the webapp classloader and cause a memory leak,
3. If the server uses a SecurityManager the static initialization of
`LoggerFactory` fails if called by unprivileged code.
This PR should solve these problems.
Signed-off-by: Piotr P. Karwasz <piotr.github@karwasz.org>