Skip to content

Commit 8b39e6e

Browse files
N1k145ppkarwasz
authored andcommitted
#1367 Added missing activation policy
1 parent ef38f57 commit 8b39e6e

File tree

5 files changed

+34
-0
lines changed

5 files changed

+34
-0
lines changed

log4j-api/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
sun.reflect;resolution:=optional,
7272
*</Import-Package>
7373
<Bundle-Activator>org.apache.logging.log4j.util.Activator</Bundle-Activator>
74+
<Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
7475
<_fixupmessages>"Classes found in the wrong directory";is:=warning</_fixupmessages>
7576
</instructions>
7677
</configuration>

log4j-core/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@
192192
javax.mail.util;version="[1.6,2)";resolution:=optional,
193193
sun.reflect;resolution:=optional,
194194
*</Import-Package>
195+
<Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
195196
<Bundle-Activator>org.apache.logging.log4j.core.osgi.Activator</Bundle-Activator>
196197
</instructions>
197198
</configuration>

log4j-slf4j-impl/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
<instructions>
112112
<Export-Package>org.apache.logging.slf4j,
113113
org.slf4j.impl</Export-Package>
114+
<Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
114115
</instructions>
115116
</configuration>
116117
</plugin>

log4j-slf4j2-impl/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
<instructions>
109109
<Export-Package>org.apache.logging.slf4j,
110110
org.slf4j.impl</Export-Package>
111+
<Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
111112
<Require-Capability>osgi.extender;filter:="(osgi.extender=osgi.serviceloader.registrar)"</Require-Capability>
112113
<Provide-Capability>osgi.serviceloader;osgi.serviceloader=org.slf4j.spi.SLF4JServiceProvider</Provide-Capability>
113114
</instructions>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Licensed to the Apache Software Foundation (ASF) under one or more
4+
~ contributor license agreements. See the NOTICE file distributed with
5+
~ this work for additional information regarding copyright ownership.
6+
~ The ASF licenses this file to you under the Apache License, Version 2.0
7+
~ (the "License"); you may not use this file except in compliance with
8+
~ the License. You may obtain a copy of the License at
9+
~
10+
~ http://www.apache.org/licenses/LICENSE-2.0
11+
~
12+
~ Unless required by applicable law or agreed to in writing, software
13+
~ distributed under the License is distributed on an "AS IS" BASIS,
14+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
~ See the License for the specific language governing permissions and
16+
~ limitations under the License.
17+
-->
18+
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19+
xmlns="http://logging.apache.org/log4j/changelog"
20+
xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
21+
type="fixed">
22+
<issue id="1367" link="https://github.com/apache/logging-log4j2/issues/1367"/>
23+
<author id="github:N1k145" name="Niklas Kellner"/>
24+
<!-- Committer -->
25+
<author name="github:ppkarwasz"/>
26+
<description format="asciidoc">
27+
Adapt the OSGi metadata of `log4j-api`, `log4j-core`, `log4j-slf4j-impl` and `log4j-slf4j2-impl` to activate the bundle when it is accessed.
28+
To achieve that set the `Bundle-ActivationPolicy` to `lazy` for the log4j bundles.
29+
</description>
30+
</entry>

0 commit comments

Comments
 (0)