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

commit e2faaa151ea2c9c5cf67344ae58aaf9849a29539
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Fri Nov 24 10:00:56 2023 +0100

    Add `@ServiceConsumer` to `log4j-plugin`
    
    This fixes the OSGi and JPMS descriptor.
---
 .../java/org/apache/logging/log4j/plugins/model/PluginRegistry.java    | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/model/PluginRegistry.java
 
b/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/model/PluginRegistry.java
index d762431970..6aaa160dee 100644
--- 
a/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/model/PluginRegistry.java
+++ 
b/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/model/PluginRegistry.java
@@ -18,6 +18,8 @@ package org.apache.logging.log4j.plugins.model;
 
 import static org.apache.logging.log4j.util.Unbox.box;
 
+import aQute.bnd.annotation.Cardinality;
+import aQute.bnd.annotation.spi.ServiceConsumer;
 import java.io.IOException;
 import java.net.URL;
 import java.text.DecimalFormat;
@@ -38,6 +40,7 @@ import org.apache.logging.log4j.util.LoaderUtil;
  * Registry singleton for PluginType maps partitioned by source type and then 
by category names.
  */
 @Singleton
+@ServiceConsumer(value = PluginService.class, cardinality = 
Cardinality.MULTIPLE)
 public class PluginRegistry {
 
     /**

Reply via email to