Add OSGi Declarative Services to startup 21/88221/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 3 Mar 2020 17:04:43 +0000 (18:04 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 3 Mar 2020 17:07:23 +0000 (18:07 +0100)
Downstreams are using not only blueprint, but also SCR. Installing
SCR from a a standalone feature (as a dependency) causes pax-logging
rewire, hence we want to install this at startup time.

JIRA: ODLPARENT-227
Change-Id: Ib87049c0172a52a0f6184c39d713841b0c7b42a2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
features-test/src/main/java/org/opendaylight/odlparent/featuretest/SingleFeatureTest.java
karaf/karaf4-parent/pom.xml

index 977c1daf8edbf9839fe1200df71a23fb42d68ed2..ff8044a439f458d6963139e6c9f93cc61783d079 100644 (file)
@@ -17,6 +17,7 @@ import static org.ops4j.pax.exam.CoreOptions.systemPackages;
 import static org.ops4j.pax.exam.CoreOptions.when;
 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.configureConsole;
 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features;
 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration;
 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder;
 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel;
@@ -226,6 +227,10 @@ public class SingleFeatureTest {
             propagateSystemProperty(BUNDLES_DIAG_TIMEOUT_PROP),
             // Needed for Agrona/aeron.io
             systemPackages("com.sun.media.sound", "sun.net", "sun.nio.ch"),
+
+            // Install SCR
+            features(maven().groupId("org.apache.karaf.features").artifactId("standard").type("xml")
+                .classifier("features").versionAsInProject(), "scr"),
         };
 
         if (JavaVersionUtil.getMajorVersion() <= 8) {
index d96506071cfc2e3b0ca1038264bc17e38b9255a0..c2954347058d035aa40fe17a644e5c7972e4f42d 100644 (file)
                         <feature>standard</feature>
                         <!-- Features always assumed to be present. Keep in sync with feature parent exclusions. -->
                         <feature>ssh</feature>
+                        <feature>scr</feature>
                         <!-- Local feature if any -->
                         <feature>${karaf.localFeature}</feature>
                     </bootFeatures>