Bug 566085 - javax.annotation to use JRE-provided packages when available
Use the same approach as in Eclipse Bug 462686 to require the
system.bundle, so as to include any JRE-provided packages, and
re-import the exported packages.
Signed-off-by: Brian de Alwis <bsd@acm.org>
Change-Id: I598ef7c6ead3f9cf66ac989959ba7427b3043f31
diff --git a/javax/javax.annotation_1.3.5/osgi.bnd b/javax/javax.annotation_1.3.5/osgi.bnd
index cf8b775..95bcb6d 100644
--- a/javax/javax.annotation_1.3.5/osgi.bnd
+++ b/javax/javax.annotation_1.3.5/osgi.bnd
@@ -1,5 +1,9 @@
package-version=${version;===;${Bundle-Version}}
+# Use JRE-provided packages if they exist: classes from the required
+# bundles always take precedence over local classes.
+Require-Bundle: system.bundle
+
Export-Package: \
!about.html,!about_files, \
*.internal.*;x-internal:=true;version="${package-version}", \
@@ -8,4 +12,7 @@
*;version="${package-version}"
Import-Package: \
+ javax.annotation;version="${package-version}", \
+ javax.annotation.security;version="${package-version}", \
+ javax.annotation.sql;version="${package-version}", \
*;resolution:=optional
diff --git a/javax/javax.annotation_1.3.5/pom.xml b/javax/javax.annotation_1.3.5/pom.xml
index 7807365..4ac91f3 100644
--- a/javax/javax.annotation_1.3.5/pom.xml
+++ b/javax/javax.annotation_1.3.5/pom.xml
@@ -11,6 +11,12 @@
<version>1.3.5-SNAPSHOT</version>
<packaging>eclipse-bundle-recipe</packaging>
<name>Jakarta Annotations API</name>
+
+ <properties>
+ <!-- Permit the use of Require-Bundle (in osgi.bnd file) -->
+ <recipe.removeadditionalheaders></recipe.removeadditionalheaders>
+ </properties>
+
<dependencies>
<dependency>
<groupId>jakarta.annotation</groupId>