Convert mdsal-binding-api to a JPMS module 65/93665/1
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 6 Nov 2020 23:44:49 +0000 (00:44 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 6 Nov 2020 23:45:57 +0000 (00:45 +0100)
This is a simple API, convert it to a module.

JIRA: MDSAL-630
Change-Id: Id41e513b26f0a58e85534b91533af70568db4a6c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-api/pom.xml
binding/mdsal-binding-api/src/main/java/module-info.java [new file with mode: 0644]
binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/query/QueryBuilderExamples.java

index 7e85fadb1c07d552b85ef4c2ac55ac3b1f2ad186..d2dfee1b703b220178a07dcefe7b3565f2d0ea5b 100644 (file)
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <configuration>
-                    <instructions>
-                        <Automatic-Module-Name>org.opendaylight.mdsal.binding.api</Automatic-Module-Name>
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
     <scm>
         <connection>scm:git:http://git.opendaylight.org/gerrit/controller.git</connection>
         <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
diff --git a/binding/mdsal-binding-api/src/main/java/module-info.java b/binding/mdsal-binding-api/src/main/java/module-info.java
new file mode 100644 (file)
index 0000000..e251a39
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * 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.binding.api {
+    exports org.opendaylight.mdsal.binding.api;
+    exports org.opendaylight.mdsal.binding.api.query;
+
+    requires transitive org.opendaylight.yangtools.yang.binding;
+    requires transitive org.opendaylight.yangtools.yang.data.api;
+    requires transitive org.opendaylight.mdsal.common.api;
+    requires org.opendaylight.yangtools.util;
+
+    // Annotations
+    requires static transitive org.eclipse.jdt.annotation;
+    requires static com.github.spotbugs.annotations;
+}
index 5dd8da5556033686dfc952de6d6764160f8c638c..bded32f5f1312054bfe18932ad8d698a3efd7673 100644 (file)
@@ -16,6 +16,7 @@ import org.opendaylight.yang.gen.v1.mdsal.query.norev.third.grp.AffectedUsers;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.Uint64;
 
+@SuppressWarnings("exports")
 public class QueryBuilderExamples {
     @Mock
     private QueryFactory factory;