Convert sal-remote-impl to JPMS module 81/115581/3
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 23 Feb 2025 12:12:30 +0000 (13:12 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 23 Feb 2025 12:27:04 +0000 (13:27 +0100)
Make sure the model has an Automatic-Module-Name and convert the
implementation to a JPMS module, based on bnd-parent.

Change-Id: I9c4cf503e3c046aea169f0d8aca5413b1ed8672b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
apps/sal-remote-impl/pom.xml
apps/sal-remote-impl/src/main/java/module-info.java [new file with mode: 0644]
model/sal-remote/pom.xml

index 220125df31a31223ac2cb8dc51ff424cf284e969..539539acd635a135205c24cbd05b1bfda68f3af6 100644 (file)
 
     <parent>
         <groupId>org.opendaylight.netconf</groupId>
-        <artifactId>netconf-parent</artifactId>
+        <artifactId>bnd-parent</artifactId>
         <version>9.0.0-SNAPSHOT</version>
-        <relativePath>../../parent</relativePath>
+        <relativePath>../../bnd-parent</relativePath>
     </parent>
 
     <artifactId>sal-remote-impl</artifactId>
     <name>${project.artifactId}</name>
-    <packaging>bundle</packaging>
+    <packaging>jar</packaging>
     <description>Implementation of sal-remote</description>
 
-    <properties>
-        <odlparent.dependency.enforce>true</odlparent.dependency.enforce>
-    </properties>
-
     <dependencies>
         <dependency>
             <groupId>com.google.code.gson</groupId>
             <groupId>org.opendaylight.mdsal</groupId>
             <artifactId>mdsal-dom-api</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.netconf</groupId>
+            <artifactId>netconf-common</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.opendaylight.netconf</groupId>
             <artifactId>restconf-api</artifactId>
             <artifactId>rfc8040-ietf-restconf-monitoring</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.opendaylight.netconf</groupId>
-            <artifactId>netconf-common</artifactId>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>org.opendaylight.netconf</groupId>
             <artifactId>restconf-server-api-testlib</artifactId>
             <artifactId>yang-test-util</artifactId>
         </dependency>
     </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <configuration>
+                    <ignoredNonTestScopedDependencies>
+                        <ignoredNonTestScopedDependency>org.opendaylight.netconf:netconf-common</ignoredNonTestScopedDependency>
+                    </ignoredNonTestScopedDependencies>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>
diff --git a/apps/sal-remote-impl/src/main/java/module-info.java b/apps/sal-remote-impl/src/main/java/module-info.java
new file mode 100644 (file)
index 0000000..b61985a
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2024 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.sal.remote.impl {
+    exports org.opendaylight.netconf.sal.remote.impl;
+
+    requires transitive org.opendaylight.restconf.mdsal.spi;
+    requires transitive org.opendaylight.restconf.server.api;
+    requires transitive org.opendaylight.restconf.server.spi;
+    requires transitive org.opendaylight.netconf.dom.api;
+    requires org.opendaylight.netconf.sal.remote;
+    requires org.opendaylight.yangtools.binding.spec;
+    requires org.opendaylight.yangtools.yang.data.spi;
+    requires org.slf4j;
+
+    // Annotation-only dependencies
+    requires static transitive javax.inject;
+    requires static transitive org.eclipse.jdt.annotation;
+    requires static org.osgi.service.component.annotations;
+}
index 002399f073b0f9d349e21a6ee21274d66dce2bd9..96513fdfe74d62a19924392619592f5052a79eb4 100644 (file)
             <artifactId>yang-common</artifactId>
         </dependency>
     </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Automatic-Module-Name>org.opendaylight.netconf.sal.remote</Automatic-Module-Name>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>