ppkarwasz commented on code in PR #2187:
URL: https://github.com/apache/logging-log4j2/pull/2187#discussion_r1451526421


##########
log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/CoreOsgiTest.java:
##########
@@ -62,6 +63,19 @@ public Option[] config() {
                 junitBundles());
     }
 
+    @ProbeBuilder
+    public TestProbeBuilder probeConfiguration(final TestProbeBuilder builder) 
{
+        // Register `Log4jPlugins` manually with the Service Loader Mediator
+        builder.setHeader(
+                Constants.PROVIDE_CAPABILITY,
+                
"osgi.serviceloader;osgi.serviceloader=\"org.apache.logging.log4j.plugins.model.PluginService\";"
+                        + 
"register:=\"org.apache.logging.log4j.osgi.tests.plugins.Log4jPlugins\"");
+        builder.setHeader(
+                Constants.REQUIRE_CAPABILITY,
+                
"osgi.extender;filter:=\"(&(osgi.extender=osgi.serviceloader.registrar)(version>=1.0)(!(version>=2.0)))\"");
+        return builder;
+    }

Review Comment:
   Since PAX Exam generates its own manifest, these properties need to be added 
by hand.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to