Migrate yang-common to bnd-parent 83/99383/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 19 Jan 2022 12:51:22 +0000 (13:51 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 19 Jan 2022 12:51:22 +0000 (13:51 +0100)
yang-common is a simple component, migrate it to bind-plugin. Also make
sure package-info.java is correctly named.

Change-Id: I5a16bab7056ea6d6124773d1ab71ddc752e0b7a9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
common/yang-common/bnd.bnd [new file with mode: 0644]
common/yang-common/pom.xml
common/yang-common/src/main/java/module-info.java
common/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/package-info.java [moved from common/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/pkg-info.java with 58% similarity]

diff --git a/common/yang-common/bnd.bnd b/common/yang-common/bnd.bnd
new file mode 100644 (file)
index 0000000..544a02c
--- /dev/null
@@ -0,0 +1 @@
+Import-Package: org.checkerframework.*;resolution:=optional, *
index 66a6ae865b23a1e4c46e486011b18ab039fcbd96..a93260ff6a414c1b1b65e8bb09e65a287d53c418 100644 (file)
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.opendaylight.yangtools</groupId>
-        <artifactId>bundle-parent</artifactId>
+        <artifactId>bnd-parent</artifactId>
         <version>8.0.0-SNAPSHOT</version>
-        <relativePath>../../bundle-parent</relativePath>
+        <relativePath>../../bnd-parent</relativePath>
     </parent>
 
     <artifactId>yang-common</artifactId>
-    <packaging>bundle</packaging>
+    <packaging>jar</packaging>
     <name>${project.artifactId}</name>
     <description>Common YANG definitions</description>
 
@@ -30,5 +30,9 @@
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>concepts</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.annotation</artifactId>
+        </dependency>
     </dependencies>
 </project>
index f0e02075b5b7f0b5db21f023416950e936196008..8efdab8b766ca9579b5a4d993b1bf17adc51a6de 100644 (file)
@@ -35,4 +35,5 @@ module org.opendaylight.yangtools.yang.common {
     requires static transitive org.eclipse.jdt.annotation;
     requires static com.github.spotbugs.annotations;
     requires static org.checkerframework.checker.qual;
+    requires static osgi.annotation;
 }
similarity index 58%
rename from common/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/pkg-info.java
rename to common/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/package-info.java
index 081e1f005eb77a42a943105b3d75b1bd5bee6d13..8cd80f67e5b3dacbc96110128d414dfa9bc91f34 100644 (file)
@@ -8,13 +8,16 @@
 /**
  * Common YANG concepts and constants expressed in terms of Java. This notably includes the concepts of
  * <ul>
- * <li>a {@link YangVersion}</li>
- * <li>a {@link Revision}</li>
- * <li>a {@link QNameModule}</li>
- * <li>a {@link QName}</li>
- * <li>a Java-native representation of a YANG string, {@link DerivedString}</li>
- * <li>a Java-native representations of numeric YANG types, like {@link Uint64}, {@link Decimal64} and
+ *   <li>a {@link YangVersion}</li>
+ *   <li>a {@link Revision}</li>
+ *   <li>a {@link QNameModule}</li>
+ *   <li>a {@link QName}</li>
+ *   <li>a Java-native representation of a YANG string, {@link DerivedString}</li>
+ *   <li>a Java-native representations of numeric YANG types, like {@link Uint64}, {@link Decimal64} and
  *     {@link Empty}</li>
  * </ul>
  */
+@Export
 package org.opendaylight.yangtools.yang.common;
+
+import org.osgi.annotation.bundle.Export;