Convert mdsal-singleton-common-api to a JPMS module 80/93680/3
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 8 Nov 2020 11:02:29 +0000 (12:02 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 8 Nov 2020 11:44:53 +0000 (12:44 +0100)
This is a very simple API component, convert it to a JPMS module,
also adjusting its dependencies.

JIRA: MDSAL-639
Change-Id: I68364c2b3e008cb4954d6693152c2a6bffc14373
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
singleton-service/mdsal-singleton-common-api/pom.xml
singleton-service/mdsal-singleton-common-api/src/main/java/module-info.java [new file with mode: 0644]
singleton-service/mdsal-singleton-common-api/src/main/java/org/opendaylight/mdsal/singleton/common/api/ClusterSingletonService.java
singleton-service/mdsal-singleton-common-api/src/main/java/org/opendaylight/mdsal/singleton/common/api/ClusterSingletonServiceProvider.java

index 6c0d3b89026f0a000bda1b965521c3c82ec1c884..ac2ff97b5c284cf59121f6e0ad1b05392c6ace4d 100644 (file)
     <packaging>bundle</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>org.opendaylight.mdsal</groupId>
-            <artifactId>mdsal-eos-common-api</artifactId>
-        </dependency>
         <dependency>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>util</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-common</artifactId>
-        </dependency>
+
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>mockito-configuration</artifactId>
diff --git a/singleton-service/mdsal-singleton-common-api/src/main/java/module-info.java b/singleton-service/mdsal-singleton-common-api/src/main/java/module-info.java
new file mode 100644 (file)
index 0000000..b2d5fbd
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+module org.opendaylight.mdsal.singleton.common.api {
+    exports org.opendaylight.mdsal.singleton.common.api;
+
+    requires transitive org.opendaylight.yangtools.concepts;
+    requires org.opendaylight.yangtools.util;
+
+    // Annotations
+    requires static transitive org.eclipse.jdt.annotation;
+}
index cd4cdca1496f71a1783a15fddcb0328a131986cd..58368c3618b52f014b407bfef3443fb80244a8ea 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.mdsal.singleton.common.api;
 
 import com.google.common.util.concurrent.ListenableFuture;
@@ -33,5 +32,4 @@ public interface ClusterSingletonService extends Identifiable<ServiceGroupIdenti
      * @return a ListenableFuture that is completed when the underlying instance close operation is complete.
      */
     ListenableFuture<? extends Object> closeServiceInstance();
-
 }
index 531483d043880da2bdd44a731dbd7fd6b0974403..6778a845b7966eae7d8cb4377669bf3c31ed2987 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.mdsal.singleton.common.api;
 
 /**
@@ -20,7 +19,6 @@ package org.opendaylight.mdsal.singleton.common.api;
  * a service group candidate must hold ownership of both these entities.
  */
 public interface ClusterSingletonServiceProvider extends AutoCloseable {
-
     /**
      * Method registers {@link ClusterSingletonService} to Provider.
      * Method returns {@link java.lang.RuntimeException} for unexpected state, so be careful with implementation.
@@ -35,5 +33,4 @@ public interface ClusterSingletonServiceProvider extends AutoCloseable {
      * @return {@link AutoCloseable} registration
      */
     ClusterSingletonServiceRegistration registerClusterSingletonService(ClusterSingletonService service);
-
 }