Convert netconf-api into a module 17/106817/2
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 5 Jul 2023 16:03:57 +0000 (18:03 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 5 Jul 2023 16:11:02 +0000 (18:11 +0200)
This is a simplistic module, convert it to JPMS. Also correct dependency
declarations to fix warnings.

Change-Id: I84549eb24ed5c1977ef23b8c0432d8cab6fc8ad4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
protocol/netconf-api/pom.xml
protocol/netconf-api/src/main/java/module-info.java [new file with mode: 0644]

index 23e0f6a0bc6066438dcfb55a8e843e8143423e23..da7e445bf61aa05795bdd2d1285234a5eedfbfd5 100644 (file)
@@ -7,53 +7,57 @@
  and is available at http://www.eclipse.org/legal/epl-v10.html
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+    <modelVersion>4.0.0</modelVersion>
 
-  <parent>
-    <groupId>org.opendaylight.netconf</groupId>
-    <artifactId>netconf-parent</artifactId>
-    <version>6.0.1-SNAPSHOT</version>
-    <relativePath>../../parent</relativePath>
-  </parent>
+    <parent>
+        <groupId>org.opendaylight.netconf</groupId>
+        <artifactId>netconf-parent</artifactId>
+        <version>6.0.1-SNAPSHOT</version>
+        <relativePath>../../parent</relativePath>
+    </parent>
 
-  <artifactId>netconf-api</artifactId>
-  <name>${project.artifactId}</name>
-  <packaging>bundle</packaging>
+    <artifactId>netconf-api</artifactId>
+    <name>${project.artifactId}</name>
+    <packaging>bundle</packaging>
 
-  <dependencies>
-    <dependency>
-      <groupId>com.github.spotbugs</groupId>
-      <artifactId>spotbugs-annotations</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>com.google.guava</groupId>
-      <artifactId>guava</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>io.netty</groupId>
-      <artifactId>netty-transport</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.yangtools</groupId>
-      <artifactId>util</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.yangtools</groupId>
-      <artifactId>yang-common</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.netconf.model</groupId>
-      <artifactId>rfc6241</artifactId>
-    </dependency>
+    <dependencies>
+        <dependency>
+            <groupId>com.github.spotbugs</groupId>
+            <artifactId>spotbugs-annotations</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty-transport</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jdt</groupId>
+            <artifactId>org.eclipse.jdt.annotation</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.yangtools</groupId>
+            <artifactId>util</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.yangtools</groupId>
+            <artifactId>yang-common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.netconf.model</groupId>
+            <artifactId>rfc6241</artifactId>
+        </dependency>
 
-    <dependency>
-      <groupId>org.opendaylight.yangtools</groupId>
-      <artifactId>mockito-configuration</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.xmlunit</groupId>
-      <artifactId>xmlunit-core</artifactId>
-    </dependency>
-  </dependencies>
+        <dependency>
+            <groupId>org.opendaylight.yangtools</groupId>
+            <artifactId>mockito-configuration</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.xmlunit</groupId>
+            <artifactId>xmlunit-core</artifactId>
+        </dependency>
+    </dependencies>
 </project>
diff --git a/protocol/netconf-api/src/main/java/module-info.java b/protocol/netconf-api/src/main/java/module-info.java
new file mode 100644 (file)
index 0000000..ead691a
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2023 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.netconf.api {
+    exports org.opendaylight.netconf.api;
+    exports org.opendaylight.netconf.api.messages;
+    exports org.opendaylight.netconf.api.xml;
+
+    requires transitive io.netty.transport;
+    requires transitive java.xml;
+    requires transitive org.opendaylight.yangtools.yang.common;
+    requires transitive org.opendaylight.yang.gen.ietf.netconf.rfc6241;
+    requires com.google.common;
+    requires org.opendaylight.yangtools.util;
+    requires org.opendaylight.yangtools.yang.binding;
+    requires org.slf4j;
+
+    // Annotation-only dependencies
+    requires static transitive org.eclipse.jdt.annotation;
+    requires static com.github.spotbugs.annotations;
+}