You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2023/07/07 10:30:56 UTC
[logging-log4j2] branch main updated: #1367 Added missing activation policy
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/main by this push:
new dbe53db5ce #1367 Added missing activation policy
dbe53db5ce is described below
commit dbe53db5ce5229b88e276e645787da5358212d66
Author: Kellner, Niklas <ma...@niklaskellner.de>
AuthorDate: Thu Apr 13 14:49:12 2023 +0200
#1367 Added missing activation policy
---
log4j-api/pom.xml | 1 +
log4j-core/pom.xml | 1 +
log4j-slf4j-impl/pom.xml | 1 +
log4j-slf4j2-impl/pom.xml | 1 +
...1367_Missing-Bundle-Activation-OSGiMetadata.xml | 30 ++++++++++++++++++++++
5 files changed, 34 insertions(+)
diff --git a/log4j-api/pom.xml b/log4j-api/pom.xml
index 318866d5ea..f594f0b72c 100644
--- a/log4j-api/pom.xml
+++ b/log4j-api/pom.xml
@@ -55,6 +55,7 @@
<Import-Package>sun.reflect;resolution:=optional,
*</Import-Package>
<Bundle-Activator>org.apache.logging.log4j.util.Activator</Bundle-Activator>
+ <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
<_fixupmessages>"Classes found in the wrong directory";is:=warning</_fixupmessages>
</instructions>
</configuration>
diff --git a/log4j-core/pom.xml b/log4j-core/pom.xml
index d086648e4c..057b672d22 100644
--- a/log4j-core/pom.xml
+++ b/log4j-core/pom.xml
@@ -151,6 +151,7 @@
javax.mail.util;version="[1.6,2)";resolution:=optional,
sun.reflect;resolution:=optional,
*</Import-Package>
+ <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
<Bundle-Activator>org.apache.logging.log4j.core.osgi.Activator</Bundle-Activator>
</instructions>
</configuration>
diff --git a/log4j-slf4j-impl/pom.xml b/log4j-slf4j-impl/pom.xml
index 2e46f17dde..234071429d 100644
--- a/log4j-slf4j-impl/pom.xml
+++ b/log4j-slf4j-impl/pom.xml
@@ -102,6 +102,7 @@
<instructions>
<Export-Package>org.apache.logging.slf4j,
org.slf4j.impl</Export-Package>
+ <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
</instructions>
</configuration>
</plugin>
diff --git a/log4j-slf4j2-impl/pom.xml b/log4j-slf4j2-impl/pom.xml
index 4b96301f86..a8242866d0 100644
--- a/log4j-slf4j2-impl/pom.xml
+++ b/log4j-slf4j2-impl/pom.xml
@@ -108,6 +108,7 @@
<instructions>
<Export-Package>org.apache.logging.slf4j,
org.slf4j.impl</Export-Package>
+ <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
<Require-Capability>osgi.extender;filter:="(osgi.extender=osgi.serviceloader.registrar)"</Require-Capability>
<Provide-Capability>osgi.serviceloader;osgi.serviceloader=org.slf4j.spi.SLF4JServiceProvider</Provide-Capability>
</instructions>
diff --git a/src/changelog/.3.x.x/1367_Missing-Bundle-Activation-OSGiMetadata.xml b/src/changelog/.3.x.x/1367_Missing-Bundle-Activation-OSGiMetadata.xml
new file mode 100644
index 0000000000..10d27565a1
--- /dev/null
+++ b/src/changelog/.3.x.x/1367_Missing-Bundle-Activation-OSGiMetadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to you under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://logging.apache.org/log4j/changelog"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ type="fixed">
+ <issue id="1367" link="https://github.com/apache/logging-log4j2/issues/1367"/>
+ <author id="github:N1k145" name="Niklas Kellner"/>
+ <!-- Committer -->
+ <author name="github:ppkarwasz"/>
+ <description format="asciidoc">
+ Adapt the OSGi metadata of `log4j-api`, `log4j-core`, `log4j-slf4j-impl` and `log4j-slf4j2-impl` to activate the bundle when it is accessed.
+ To achieve that set the `Bundle-ActivationPolicy` to `lazy` for the log4j bundles.
+ </description>
+</entry>