summaryrefslogtreecommitdiffstats
path: root/bundle-plugin-test
diff options
context:
space:
mode:
authorgjoranv <gv@yahooinc.com>2023-05-24 00:42:21 +0200
committergjoranv <gv@yahooinc.com>2023-05-24 00:42:21 +0200
commit6b3cdc3756a0c9169744f206902821d4b44788fc (patch)
tree798be950cf6505e20dd75fd2651386cff55e54bb /bundle-plugin-test
parent60339a70a6be71d5bfa1a5848f17fdc4cf903b7d (diff)
Add X-JDisc-PublicApi-Package header
Diffstat (limited to 'bundle-plugin-test')
-rw-r--r--bundle-plugin-test/integration-test/src/test/java/com/yahoo/container/plugin/BundleTest.java5
-rw-r--r--bundle-plugin-test/test-bundles/main/src/main/java/com/yahoo/test/package-info.java2
2 files changed, 7 insertions, 0 deletions
diff --git a/bundle-plugin-test/integration-test/src/test/java/com/yahoo/container/plugin/BundleTest.java b/bundle-plugin-test/integration-test/src/test/java/com/yahoo/container/plugin/BundleTest.java
index 2e3a3204ef5..e06ce45a5f5 100644
--- a/bundle-plugin-test/integration-test/src/test/java/com/yahoo/container/plugin/BundleTest.java
+++ b/bundle-plugin-test/integration-test/src/test/java/com/yahoo/container/plugin/BundleTest.java
@@ -103,6 +103,11 @@ public class BundleTest {
assertTrue(exportPackage.contains("com.yahoo.test;version=1.2.3.RELEASE"));
}
+ @Test
+ void require_that_manifest_contains_public_api() {
+ assertEquals("com.yahoo.test", mainAttributes.getValue("X-JDisc-PublicApi-Package"));
+ }
+
// TODO: use another jar than jrt, which now pulls in a lot of dependencies that pollute the manifest of the
// generated bundle. (It's compile scoped in pom.xml to be added to the bundle-cp.)
@Test
diff --git a/bundle-plugin-test/test-bundles/main/src/main/java/com/yahoo/test/package-info.java b/bundle-plugin-test/test-bundles/main/src/main/java/com/yahoo/test/package-info.java
index 852a8387cfe..0169574fe74 100644
--- a/bundle-plugin-test/test-bundles/main/src/main/java/com/yahoo/test/package-info.java
+++ b/bundle-plugin-test/test-bundles/main/src/main/java/com/yahoo/test/package-info.java
@@ -1,6 +1,8 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
@ExportPackage(version = @Version(major = 1, minor = 2, micro = 3, qualifier = "RELEASE"))
+@PublicApi
package com.yahoo.test;
+import com.yahoo.api.annotations.PublicApi;
import com.yahoo.osgi.annotation.ExportPackage;
import com.yahoo.osgi.annotation.Version;