summaryrefslogtreecommitdiffstats
path: root/bundle-plugin-test/test-bundles/export-packages-lib
diff options
context:
space:
mode:
authorgjoranv <gv@yahooinc.com>2023-06-09 16:52:52 +0200
committergjoranv <gv@yahooinc.com>2023-06-09 16:56:14 +0200
commit7ac829699dc908bd747f97714a1b8fc9a12ded18 (patch)
treea74c25e8ed608853657f274260fbb536ab6c5ecf /bundle-plugin-test/test-bundles/export-packages-lib
parentacd484916c47a0c158a29d3c77bb34b1f502b78f (diff)
Add test for non-public api manifest header..
and add new test bundle to avoid depending on proper Vespa bundles.
Diffstat (limited to 'bundle-plugin-test/test-bundles/export-packages-lib')
-rw-r--r--bundle-plugin-test/test-bundles/export-packages-lib/pom.xml31
-rw-r--r--bundle-plugin-test/test-bundles/export-packages-lib/src/main/java/ai/vespa/lib/non_public/package-info.java5
-rw-r--r--bundle-plugin-test/test-bundles/export-packages-lib/src/main/java/ai/vespa/lib/public_api/package-info.java7
-rw-r--r--bundle-plugin-test/test-bundles/export-packages-lib/src/main/java/com/yahoo/lib/non_pubilc/package-info.java5
-rw-r--r--bundle-plugin-test/test-bundles/export-packages-lib/src/main/java/com/yahoo/lib/public_api/package-info.java7
5 files changed, 55 insertions, 0 deletions
diff --git a/bundle-plugin-test/test-bundles/export-packages-lib/pom.xml b/bundle-plugin-test/test-bundles/export-packages-lib/pom.xml
new file mode 100644
index 00000000000..09eedda0b98
--- /dev/null
+++ b/bundle-plugin-test/test-bundles/export-packages-lib/pom.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>com.yahoo.vespa.bundle-plugin</groupId>
+ <artifactId>test-bundles</artifactId>
+ <version>8-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>export-packages-lib</artifactId>
+ <version>8-SNAPSHOT</version>
+ <packaging>container-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.yahoo.vespa</groupId>
+ <artifactId>bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <!-- Must be an internal bundle to get manifest header for non-public export packages -->
+ <bundleType>INTERNAL</bundleType>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/bundle-plugin-test/test-bundles/export-packages-lib/src/main/java/ai/vespa/lib/non_public/package-info.java b/bundle-plugin-test/test-bundles/export-packages-lib/src/main/java/ai/vespa/lib/non_public/package-info.java
new file mode 100644
index 00000000000..18841cf6f37
--- /dev/null
+++ b/bundle-plugin-test/test-bundles/export-packages-lib/src/main/java/ai/vespa/lib/non_public/package-info.java
@@ -0,0 +1,5 @@
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+@ExportPackage
+package ai.vespa.lib.non_public;
+
+import com.yahoo.osgi.annotation.ExportPackage;
diff --git a/bundle-plugin-test/test-bundles/export-packages-lib/src/main/java/ai/vespa/lib/public_api/package-info.java b/bundle-plugin-test/test-bundles/export-packages-lib/src/main/java/ai/vespa/lib/public_api/package-info.java
new file mode 100644
index 00000000000..c586faf6bb6
--- /dev/null
+++ b/bundle-plugin-test/test-bundles/export-packages-lib/src/main/java/ai/vespa/lib/public_api/package-info.java
@@ -0,0 +1,7 @@
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+@ExportPackage
+@PublicApi
+package ai.vespa.lib.public_api;
+
+import com.yahoo.api.annotations.PublicApi;
+import com.yahoo.osgi.annotation.ExportPackage;
diff --git a/bundle-plugin-test/test-bundles/export-packages-lib/src/main/java/com/yahoo/lib/non_pubilc/package-info.java b/bundle-plugin-test/test-bundles/export-packages-lib/src/main/java/com/yahoo/lib/non_pubilc/package-info.java
new file mode 100644
index 00000000000..a3368af200c
--- /dev/null
+++ b/bundle-plugin-test/test-bundles/export-packages-lib/src/main/java/com/yahoo/lib/non_pubilc/package-info.java
@@ -0,0 +1,5 @@
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+@ExportPackage
+package com.yahoo.lib.non_public;
+
+import com.yahoo.osgi.annotation.ExportPackage;
diff --git a/bundle-plugin-test/test-bundles/export-packages-lib/src/main/java/com/yahoo/lib/public_api/package-info.java b/bundle-plugin-test/test-bundles/export-packages-lib/src/main/java/com/yahoo/lib/public_api/package-info.java
new file mode 100644
index 00000000000..b0ff91eb53e
--- /dev/null
+++ b/bundle-plugin-test/test-bundles/export-packages-lib/src/main/java/com/yahoo/lib/public_api/package-info.java
@@ -0,0 +1,7 @@
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+@ExportPackage
+@PublicApi
+package com.yahoo.lib.public_api;
+
+import com.yahoo.api.annotations.PublicApi;
+import com.yahoo.osgi.annotation.ExportPackage;