From 0e88f4adba7758283c6a7647c2a2d58f8691a322 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Fri, 11 Mar 2022 14:44:02 +0100 Subject: [PATCH] Do not use blueprint-maven-plugin in topology-lldp-discovery Inline the generated container and dist dependencies on annotations and the plugin. Change-Id: Ie021db12d1cb6fdc8a841e7cd81fa1e589e4e40a Signed-off-by: Robert Varga --- applications/topology-lldp-discovery/pom.xml | 14 ----------- .../topology/lldp/LLDPActivator.java | 3 +-- .../topology/lldp/LLDPDiscoveryListener.java | 5 ++-- .../topology/lldp/LLDPLinkAger.java | 9 +++---- .../resources/OSGI-INF/blueprint/autowire.xml | 25 +++++++++++++++++++ 5 files changed, 32 insertions(+), 24 deletions(-) create mode 100644 applications/topology-lldp-discovery/src/main/resources/OSGI-INF/blueprint/autowire.xml diff --git a/applications/topology-lldp-discovery/pom.xml b/applications/topology-lldp-discovery/pom.xml index 241b1408d3..a8dfb75484 100644 --- a/applications/topology-lldp-discovery/pom.xml +++ b/applications/topology-lldp-discovery/pom.xml @@ -52,22 +52,8 @@ javax.annotation-api true - - org.apache.aries.blueprint - blueprint-maven-plugin-annotation - true - - - - - org.apache.aries.blueprint - blueprint-maven-plugin - - - - scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git diff --git a/applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPActivator.java b/applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPActivator.java index 5733c6a185..5d6f82dfa9 100644 --- a/applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPActivator.java +++ b/applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPActivator.java @@ -11,7 +11,6 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import javax.annotation.PreDestroy; import javax.inject.Inject; import javax.inject.Singleton; -import org.apache.aries.blueprint.annotation.service.Reference; import org.opendaylight.mdsal.binding.api.NotificationService; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.TopologyLldpDiscoveryConfig; import org.opendaylight.yangtools.concepts.ListenerRegistration; @@ -29,7 +28,7 @@ public class LLDPActivator implements AutoCloseable { @SuppressFBWarnings("ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD") @Inject - public LLDPActivator(@Reference NotificationService notificationService, + public LLDPActivator(NotificationService notificationService, LLDPDiscoveryListener lldpDiscoveryListener, TopologyLldpDiscoveryConfig topologyLldpDiscoveryConfig) { lldpSecureKey = topologyLldpDiscoveryConfig.getLldpSecureKey(); diff --git a/applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPDiscoveryListener.java b/applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPDiscoveryListener.java index 5d5bc18429..2766e169ee 100644 --- a/applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPDiscoveryListener.java +++ b/applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPDiscoveryListener.java @@ -9,7 +9,6 @@ package org.opendaylight.openflowplugin.applications.topology.lldp; import javax.inject.Inject; import javax.inject.Singleton; -import org.apache.aries.blueprint.annotation.service.Reference; import org.opendaylight.mdsal.binding.api.NotificationPublishService; import org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService; import org.opendaylight.openflowplugin.applications.topology.lldp.utils.LLDPDiscoveryUtils; @@ -32,8 +31,8 @@ public class LLDPDiscoveryListener implements PacketProcessingListener { private final EntityOwnershipService eos; @Inject - public LLDPDiscoveryListener(@Reference final NotificationPublishService notificationService, - final LLDPLinkAger lldpLinkAger, @Reference final EntityOwnershipService entityOwnershipService) { + public LLDPDiscoveryListener(final NotificationPublishService notificationService, + final LLDPLinkAger lldpLinkAger, final EntityOwnershipService entityOwnershipService) { this.notificationService = notificationService; this.lldpLinkAger = lldpLinkAger; this.eos = entityOwnershipService; diff --git a/applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPLinkAger.java b/applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPLinkAger.java index c6a38365ce..fbc382f6b5 100644 --- a/applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPLinkAger.java +++ b/applications/topology-lldp-discovery/src/main/java/org/opendaylight/openflowplugin/applications/topology/lldp/LLDPLinkAger.java @@ -18,7 +18,6 @@ import java.util.concurrent.ConcurrentHashMap; import javax.annotation.PreDestroy; import javax.inject.Inject; import javax.inject.Singleton; -import org.apache.aries.blueprint.annotation.service.Reference; import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener; import org.opendaylight.mdsal.binding.api.DataBroker; @@ -69,10 +68,10 @@ public class LLDPLinkAger implements ConfigurationListener, ClusteredDataTreeCha @Inject @SuppressWarnings("checkstyle:IllegalCatch") public LLDPLinkAger(final TopologyLldpDiscoveryConfig topologyLldpDiscoveryConfig, - @Reference final NotificationPublishService notificationService, - @Reference final ConfigurationService configurationService, - @Reference final EntityOwnershipService entityOwnershipService, - @Reference final DataBroker dataBroker) { + final NotificationPublishService notificationService, + final ConfigurationService configurationService, + final EntityOwnershipService entityOwnershipService, + final DataBroker dataBroker) { this.linkExpirationTime = topologyLldpDiscoveryConfig.getTopologyLldpExpirationInterval().getValue().toJava(); this.notificationService = notificationService; this.configurationServiceRegistration = configurationService.registerListener(this); diff --git a/applications/topology-lldp-discovery/src/main/resources/OSGI-INF/blueprint/autowire.xml b/applications/topology-lldp-discovery/src/main/resources/OSGI-INF/blueprint/autowire.xml new file mode 100644 index 0000000000..d04d335e20 --- /dev/null +++ b/applications/topology-lldp-discovery/src/main/resources/OSGI-INF/blueprint/autowire.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.36.6