Convert yang-binding to a JPMS module 39/93639/1
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 6 Nov 2020 19:01:32 +0000 (20:01 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 6 Nov 2020 20:37:49 +0000 (21:37 +0100)
The code itself is simple, just export it. UTs need an override
to allow use of Whitebox.

JIRA: MDSAL-624
Change-Id: I1d1114473563fe9237df5855ef95c45318cd2ec9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/yang-binding/pom.xml
binding/yang-binding/src/main/java/module-info.java [new file with mode: 0644]

index 2c8d426e4b269ebb15b92eaf8fa86a351b8207ba..07a4a5359ce3f446386ff8abaaa10e6247f3b2c5 100644 (file)
@@ -17,7 +17,6 @@
     </parent>
 
     <artifactId>yang-binding</artifactId>
-    <version>7.0.2-SNAPSHOT</version>
     <packaging>bundle</packaging>
     <name>${project.artifactId}</name>
     <description>Java binding for YANG</description>
     <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.binding</Automatic-Module-Name>
-                    </instructions>
+                    <argLine>@{argLine}
+                        --add-opens org.opendaylight.yangtools.yang.binding/org.opendaylight.yangtools.yang.binding=ALL-UNNAMED
+                    </argLine>
                 </configuration>
             </plugin>
         </plugins>
diff --git a/binding/yang-binding/src/main/java/module-info.java b/binding/yang-binding/src/main/java/module-info.java
new file mode 100644 (file)
index 0000000..d9640ba
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * 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.binding {
+    exports org.opendaylight.yangtools.yang.binding;
+    exports org.opendaylight.yangtools.yang.binding.annotations;
+    exports org.opendaylight.yangtools.yang.binding.util;
+
+    requires transitive org.opendaylight.yangtools.yang.common;
+    requires org.opendaylight.yangtools.util;
+
+    // Annotations
+    requires static transitive org.eclipse.jdt.annotation;
+    requires static com.github.spotbugs.annotations;
+}