Convert yang-model-util to JPMS 50/93150/2
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 18 Oct 2020 16:54:44 +0000 (18:54 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 19 Oct 2020 09:14:13 +0000 (11:14 +0200)
This is one of our core dependencies, convert it so that we can
proceed further. Note that UTs require a block of pom.xml magic
to work.

JIRA: YANGTOOLS-934
Change-Id: Ifdd94495717d19138a1cf2580cde1dd0e9418e10
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-model-util/pom.xml
yang/yang-model-util/src/main/java/module-info.java [new file with mode: 0644]

index fc713012f5bff4ee749cb6ec946c26f3fb4d0e9c..c229dd42974ea44a2a6b591d5053a41eaaa18d28 100644 (file)
     <build>
         <plugins>
             <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
+                <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>
-                    <instructions>
-                        <Automatic-Module-Name>org.opendaylight.yangtools.yang.model.util</Automatic-Module-Name>
-                    </instructions>
+                    <argLine>@{argLine}
+                        --add-opens org.opendaylight.yangtools.yang.model.util/org.opendaylight.yangtools.yang.model.util=ALL-UNNAMED
+                        --add-opens org.opendaylight.yangtools.yang.model.util/org.opendaylight.yangtools.yang.model.util.type=ALL-UNNAMED
+                        --add-opens org.opendaylight.yangtools.yang.model.util/org.opendaylight.yangtools.yang.model.repo.util=ALL-UNNAMED
+                    </argLine>
                 </configuration>
             </plugin>
         </plugins>
diff --git a/yang/yang-model-util/src/main/java/module-info.java b/yang/yang-model-util/src/main/java/module-info.java
new file mode 100644 (file)
index 0000000..77c5563
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * 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.yangtools.yang.model.util {
+    exports org.opendaylight.yangtools.yang.model.util;
+    exports org.opendaylight.yangtools.yang.model.util.type;
+    exports org.opendaylight.yangtools.yang.model.repo.util;
+
+    requires transitive org.opendaylight.yangtools.rfc7952.model.api;
+
+    requires org.opendaylight.yangtools.util;
+    requires org.slf4j;
+}