Do not use blueprint-maven-plugin in reconciliation-framework 71/100071/5
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 11 Mar 2022 13:46:00 +0000 (14:46 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 11 Mar 2022 14:25:00 +0000 (15:25 +0100)
Inline the generated container and dist dependencies on annotations
and the plugin.

Change-Id: Id3cdfa2dd24faa0fb3b7aad6ba4447dc2176dae5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
applications/reconciliation-framework/pom.xml
applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/impl/ReconciliationManagerImpl.java
applications/reconciliation-framework/src/main/resources/OSGI-INF/blueprint/autowire.xml [new file with mode: 0644]

index 42cc9ba41f079caad78fc0bb18016d69a71bb32c..d9e5998fa93c0e455ab0431832339e341447e81e 100644 (file)
             <artifactId>javax.annotation-api</artifactId>
             <optional>true</optional>
         </dependency>
-        <dependency>
-            <groupId>org.apache.aries.blueprint</groupId>
-            <artifactId>blueprint-maven-plugin-annotation</artifactId>
-            <optional>true</optional>
-        </dependency>
 
         <dependency>
             <groupId>org.opendaylight.mdsal</groupId>
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.aries.blueprint</groupId>
-                <artifactId>blueprint-maven-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
     <scm>
         <connection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</connection>
         <developerConnection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</developerConnection>
index 1961ce6655b5e31c5cb2b785b7529d010a17d484..08c502bb171aa5c212a3a2f305888e59c2655dc5 100644 (file)
@@ -25,8 +25,6 @@ import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 import javax.inject.Inject;
 import javax.inject.Singleton;
-import org.apache.aries.blueprint.annotation.service.Reference;
-import org.apache.aries.blueprint.annotation.service.Service;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
 import org.opendaylight.openflowplugin.api.openflow.mastership.MastershipChangeException;
@@ -40,7 +38,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @Singleton
-@Service(classes = ReconciliationManager.class)
 public class ReconciliationManagerImpl implements ReconciliationManager, ReconciliationFrameworkEvent {
     private static final Logger LOG = LoggerFactory.getLogger(ReconciliationManagerImpl.class);
 
@@ -52,7 +49,7 @@ public class ReconciliationManagerImpl implements ReconciliationManager, Reconci
     private final AtomicReference<ResultState> decidedResultState = new AtomicReference<>(ResultState.DONOTHING);
 
     @Inject
-    public ReconciliationManagerImpl(@Reference final MastershipChangeServiceManager mastershipChangeServiceManager) {
+    public ReconciliationManagerImpl(final MastershipChangeServiceManager mastershipChangeServiceManager) {
         this.mastershipChangeServiceManager = requireNonNull(mastershipChangeServiceManager,
             "MastershipChangeServiceManager can not be null!");
     }
diff --git a/applications/reconciliation-framework/src/main/resources/OSGI-INF/blueprint/autowire.xml b/applications/reconciliation-framework/src/main/resources/OSGI-INF/blueprint/autowire.xml
new file mode 100644 (file)
index 0000000..2f582f3
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+    <bean id="reconciliationManagerImpl" class="org.opendaylight.openflowplugin.applications.reconciliation.impl.ReconciliationManagerImpl" init-method="start" destroy-method="close">
+        <argument ref="mastershipChangeServiceManager"/>
+    </bean>
+    <reference id="mastershipChangeServiceManager" interface="org.opendaylight.openflowplugin.api.openflow.mastership.MastershipChangeServiceManager"/>
+    <service ref="reconciliationManagerImpl" interface="org.opendaylight.openflowplugin.applications.reconciliation.ReconciliationManager"/>
+</blueprint>