Turn yang-model-export into a JPMS module 46/95946/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 27 Apr 2021 09:13:32 +0000 (11:13 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 27 Apr 2021 09:20:07 +0000 (11:20 +0200)
This is a simple component, add a module-info and clean up dependencies.

JIRA: YANGTOOLS-1281
Change-Id: Ief7bd386198cef51b64a7a7ca11398f2e3c88ba2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
model/yang-model-export/pom.xml
model/yang-model-export/src/main/java/module-info.java [new file with mode: 0644]
model/yang-model-export/src/test/java/org/opendaylight/yangtools/yang/model/export/Bug6856Test.java
model/yang-model-export/src/test/resources/bugs/bug-6856/bar.yang [moved from model/yang-model-export/src/test/resources/bugs/bug6856/bar.yang with 100% similarity]
model/yang-model-export/src/test/resources/bugs/bug-6856/foo.yang [moved from model/yang-model-export/src/test/resources/bugs/bug6856/foo.yang with 100% similarity]

index 393de0b4554e322822141d64443f69617e530236..42844e8227a5e32d30a962e00632dafd527d06b6 100644 (file)
     <description>${project.artifactId}</description>
 
     <dependencies>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.yangtools</groupId>
+            <artifactId>concepts</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.yangtools</groupId>
+            <artifactId>yang-common</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>yang-model-api</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>org.opendaylight.yangtools</groupId>
+            <artifactId>util</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.yangtools</groupId>
+            <artifactId>yang-repo-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.yangtools</groupId>
+            <artifactId>yang-repo-spi</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.yangtools</groupId>
+            <artifactId>yang-parser-rfc7950</artifactId>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>yang-parser-impl</artifactId>
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>yang-test-util</artifactId>
-            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.xmlunit</groupId>
             <artifactId>xmlunit-legacy</artifactId>
         </dependency>
     </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <configuration>
-                    <instructions>
-                        <Automatic-Module-Name>org.opendaylight.yangtools.yang.model.export</Automatic-Module-Name>
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 </project>
diff --git a/model/yang-model-export/src/main/java/module-info.java b/model/yang-model-export/src/main/java/module-info.java
new file mode 100644 (file)
index 0000000..8179b9c
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2021 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.yangtools.yang.model.export {
+    exports org.opendaylight.yangtools.yang.model.export;
+
+    requires transitive org.opendaylight.yangtools.concepts;
+    requires transitive org.opendaylight.yangtools.yang.common;
+    requires transitive org.opendaylight.yangtools.yang.model.api;
+    requires com.google.common;
+
+    // Annotations
+    requires static transitive org.eclipse.jdt.annotation;
+    requires static com.github.spotbugs.annotations;
+}
index 8241ec316b9ebd6f48e9d94f89da3c5bb9ec3a39..b2f8fe312ca9a09414da739b0ee008b7f2bce1c4 100644 (file)
@@ -26,7 +26,7 @@ public class Bug6856Test {
     @Test
     public void testImplicitInputAndOutputInRpc() throws Exception {
         final SchemaContext schemaContext = YangParserTestUtils.parseYangResources(Bug6856Test.class,
-            "/bugs/bug6856/foo.yang");
+            "/bugs/bug-6856/foo.yang");
         assertNotNull(schemaContext);
 
         final OutputStream byteArrayOutputStream = new ByteArrayOutputStream();
@@ -46,7 +46,7 @@ public class Bug6856Test {
     @Test
     public void testExplicitInputAndOutputInRpc() throws Exception {
         final SchemaContext schemaContext = YangParserTestUtils.parseYangResources(Bug6856Test.class,
-            "/bugs/bug6856/bar.yang");
+            "/bugs/bug-6856/bar.yang");
         assertNotNull(schemaContext);
 
         final OutputStream byteArrayOutputStream = new ByteArrayOutputStream();