Do not use javax.annotation from JDK. (#4164)

There is no @Priority in JDK.

Signed-off-by: Jan Supol <jan.supol@oracle.com>
diff --git a/bundles/jaxrs-ri/pom.xml b/bundles/jaxrs-ri/pom.xml
index ec7361b..382eacf 100644
--- a/bundles/jaxrs-ri/pom.xml
+++ b/bundles/jaxrs-ri/pom.xml
@@ -281,7 +281,7 @@
                             javax.servlet.annotation.*;resolution:=optional;version="[2.4,5.0)",
                             javax.servlet.descriptor.*;resolution:=optional;version="[2.4,5.0)",
                             javax.servlet.*;version="[2.4,5.0)",
-                            javax.annotation;version="!",
+                            ${javax.annotation.osgi.version},
                             javax.persistence.*;resolution:=optional,
                             javax.validation.*;resolution:=optional;version="${range;[==,3);${javax.validation.api.version}}",
                             sun.misc.*;resolution:=optional,
diff --git a/containers/glassfish/jersey-gf-ejb/pom.xml b/containers/glassfish/jersey-gf-ejb/pom.xml
index 0c97a46..8b42c47 100644
--- a/containers/glassfish/jersey-gf-ejb/pom.xml
+++ b/containers/glassfish/jersey-gf-ejb/pom.xml
@@ -116,7 +116,7 @@
                         <!-- Explicitly set versions for packages from GlassFish to allow future uptake of GlassFish 5.x-->
                         <Import-Package>
                             com.sun.*;version="[4.0,6)",
-                            javax.annotation.*;version="!",
+                            ${javax.annotation.osgi.version},
                             org.glassfish.ejb.*;version="[4.0,6)",
                             org.glassfish.internal.*;version="[4.0,6)",
                             *
diff --git a/containers/jersey-servlet-core/pom.xml b/containers/jersey-servlet-core/pom.xml
index 8e90bde..090ad99 100644
--- a/containers/jersey-servlet-core/pom.xml
+++ b/containers/jersey-servlet-core/pom.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-    Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
 
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v. 2.0, which is available at
@@ -72,7 +72,7 @@
                         <Import-Package>
                             javax.persistence.*;resolution:=optional,
                             javax.servlet.*;version="[2.4,5.0)",
-                            javax.annotation.*;version=!,
+                            ${javax.annotation.osgi.version},
                             *
                         </Import-Package>
                         <Export-Package>org.glassfish.jersey.servlet.*</Export-Package>
diff --git a/containers/jersey-servlet/pom.xml b/containers/jersey-servlet/pom.xml
index 9f901d0..6dac7d1 100644
--- a/containers/jersey-servlet/pom.xml
+++ b/containers/jersey-servlet/pom.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-    Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
 
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v. 2.0, which is available at
@@ -79,7 +79,7 @@
                         <!-- Note: When you're changing these properties change them also in bundles/jax-rs-ri/bundle/pom.xml. -->
                         <Import-Package>
                             javax.servlet.*;version="[3.0,5.0)",
-                            javax.annotation.*;version=!,
+                            ${javax.annotation.osgi.version},
                             *
                         </Import-Package>
                     </instructions>
diff --git a/core-client/pom.xml b/core-client/pom.xml
index d10e482..a8557e0 100644
--- a/core-client/pom.xml
+++ b/core-client/pom.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-    Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 2011, 2019 Oracle and/or its affiliates. All rights reserved.
 
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v. 2.0, which is available at
@@ -91,7 +91,7 @@
                 <configuration>
                     <instructions>
                         <Import-Package>
-                            javax.annotation.*;version="!",
+                            ${javax.annotation.osgi.version},
                             *
                         </Import-Package>
                         <unpackBundle>true</unpackBundle>
diff --git a/core-common/pom.xml b/core-common/pom.xml
index 86a54ab..fd8c571 100644
--- a/core-common/pom.xml
+++ b/core-common/pom.xml
@@ -127,7 +127,7 @@
                         <Import-Package>
                             sun.misc.*;resolution:=optional,
                             javax.activation.*;version="!",
-                            javax.annotation.*;version="!",
+                            ${javax.annotation.osgi.version},
                             *
                         </Import-Package>
                         <Export-Package>org.glassfish.jersey.*;version=${project.version}</Export-Package>
diff --git a/core-server/pom.xml b/core-server/pom.xml
index ce49a47..7166534 100644
--- a/core-server/pom.xml
+++ b/core-server/pom.xml
@@ -94,7 +94,7 @@
                             com.sun.research.ws.wadl.*;version=${project.version}
                         </Export-Package>
                         <Import-Package>
-                            javax.annotation.*;version="!",
+                            ${javax.annotation.osgi.version},
                             javax.validation.*;resolution:=optional;version="${range;[==,3);${javax.validation.api.version}}",
                             *
                         </Import-Package>
diff --git a/ext/bean-validation/pom.xml b/ext/bean-validation/pom.xml
index 979c8dd..e55d036 100644
--- a/ext/bean-validation/pom.xml
+++ b/ext/bean-validation/pom.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!--
 
-    Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
 
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v. 2.0, which is available at
@@ -55,7 +55,7 @@
                         <!-- Note: When you're changing these properties change them also in bundles/jax-rs-ri/bundle/pom.xml. -->
                         <Export-Package>org.glassfish.jersey.server.validation.*;version=${project.version}</Export-Package>
                         <Import-Package>
-                            javax.annotation.*;version="!",
+                            ${javax.annotation.osgi.version},
                             javax.validation.*;resolution:=optional;version="${range;[==,3);${javax.validation.api.version}}",
                             *
                         </Import-Package>
diff --git a/ext/cdi/jersey-cdi1x-transaction/pom.xml b/ext/cdi/jersey-cdi1x-transaction/pom.xml
index 5b23ddc..53b76f7 100644
--- a/ext/cdi/jersey-cdi1x-transaction/pom.xml
+++ b/ext/cdi/jersey-cdi1x-transaction/pom.xml
@@ -91,7 +91,7 @@
                 <configuration>
                     <instructions>
                         <Export-Package>org.glassfish.jersey.ext.cdi1x.transaction.internal</Export-Package>
-                        <Import-Package>javax.annotation.*;version="!",*</Import-Package>
+                        <Import-Package>${javax.annotation.osgi.version},*</Import-Package>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/ext/cdi/jersey-cdi1x-validation/pom.xml b/ext/cdi/jersey-cdi1x-validation/pom.xml
index 6eefa02..ce09e0d 100644
--- a/ext/cdi/jersey-cdi1x-validation/pom.xml
+++ b/ext/cdi/jersey-cdi1x-validation/pom.xml
@@ -101,7 +101,7 @@
                 <configuration>
                     <instructions>
                         <Export-Package>org.glassfish.jersey.ext.cdi1x.validation.internal;version=${project.version}</Export-Package>
-                        <Import-Package>javax.annotation.*;version="!",*</Import-Package>
+                        <Import-Package>${javax.annotation.osgi.version},*</Import-Package>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/ext/cdi/jersey-cdi1x/pom.xml b/ext/cdi/jersey-cdi1x/pom.xml
index 0966ce7..5d1e103 100644
--- a/ext/cdi/jersey-cdi1x/pom.xml
+++ b/ext/cdi/jersey-cdi1x/pom.xml
@@ -83,7 +83,7 @@
                             org.glassfish.jersey.ext.cdi1x.spi,org.glassfish.jersey.ext.cdi1x.internal,
                             org.glassfish.jersey.ext.cdi1x.internal.spi
                         </Export-Package>
-                        <Import-Package>javax.annotation.*;version="!",*</Import-Package>
+                        <Import-Package>${javax.annotation.osgi.version},*</Import-Package>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/ext/entity-filtering/pom.xml b/ext/entity-filtering/pom.xml
index 2c79264..cae0b4a 100644
--- a/ext/entity-filtering/pom.xml
+++ b/ext/entity-filtering/pom.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!--
 
-    Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 2013, 2019 Oracle and/or its affiliates. All rights reserved.
 
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v. 2.0, which is available at
@@ -76,7 +76,7 @@
                 <configuration>
                     <instructions>
                         <Export-Package>org.glassfish.jersey.message.filtering.*;version=${project.version}</Export-Package>
-                        <Import-Package>javax.annotation.*;version="!",*</Import-Package>
+                        <Import-Package>${javax.annotation.osgi.version},*</Import-Package>
                     </instructions>
                     <unpackBundle>true</unpackBundle>
                 </configuration>
diff --git a/ext/metainf-services/pom.xml b/ext/metainf-services/pom.xml
index 2bb89b7..e992e59 100644
--- a/ext/metainf-services/pom.xml
+++ b/ext/metainf-services/pom.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!--
 
-    Copyright (c) 2014, 2018 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 2014, 2019 Oracle and/or its affiliates. All rights reserved.
 
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v. 2.0, which is available at
@@ -83,7 +83,7 @@
                 <configuration>
                     <instructions>
                         <Import-Package>
-                            javax.annotation.*;version="!",
+                            ${javax.annotation.osgi.version},
                             *
                         </Import-Package>
                         <unpackBundle>true</unpackBundle>
diff --git a/ext/mvc/pom.xml b/ext/mvc/pom.xml
index 8d84a6f..a830611 100644
--- a/ext/mvc/pom.xml
+++ b/ext/mvc/pom.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!--
 
-    Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 2013, 2019 Oracle and/or its affiliates. All rights reserved.
 
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v. 2.0, which is available at
@@ -67,7 +67,7 @@
                 <configuration>
                     <instructions>
                         <Export-Package>org.glassfish.jersey.server.mvc.*;version=${project.version}</Export-Package>
-                        <Import-Package>javax.annotation.*;version="!",*</Import-Package>
+                        <Import-Package>${javax.annotation.osgi.version},*</Import-Package>
                     </instructions>
                     <unpackBundle>true</unpackBundle>
                 </configuration>
diff --git a/inject/cdi2-se/pom.xml b/inject/cdi2-se/pom.xml
index 43fc892..c5684f6 100644
--- a/inject/cdi2-se/pom.xml
+++ b/inject/cdi2-se/pom.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-    Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 2017, 2019 Oracle and/or its affiliates. All rights reserved.
 
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v. 2.0, which is available at
@@ -87,7 +87,7 @@
                         </Export-Package>
                         <Import-Package>
                             sun.misc.*;resolution:=optional,
-                            javax.annotation.*;version="!",
+                            ${javax.annotation.osgi.version},
                             *
                         </Import-Package>
                     </instructions>
diff --git a/inject/hk2/pom.xml b/inject/hk2/pom.xml
index b33a71c..551f901 100644
--- a/inject/hk2/pom.xml
+++ b/inject/hk2/pom.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-    Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 2017, 2019 Oracle and/or its affiliates. All rights reserved.
 
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v. 2.0, which is available at
@@ -87,7 +87,7 @@
                         </Export-Package>
                         <Import-Package>
                             sun.misc.*;resolution:=optional,
-                            javax.annotation.*;version="!",
+                            ${javax.annotation.osgi.version},
                             *
                         </Import-Package>
                     </instructions>
diff --git a/media/json-binding/pom.xml b/media/json-binding/pom.xml
index e7d4e8c..2a9dad9 100644
--- a/media/json-binding/pom.xml
+++ b/media/json-binding/pom.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-    Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 2017, 2019 Oracle and/or its affiliates. All rights reserved.
 
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v. 2.0, which is available at
@@ -54,7 +54,7 @@
                 <configuration>
                     <instructions>
                         <Export-Package>org.glassfish.jersey.jackson.*</Export-Package>
-                        <Import-Package>javax.annotation.*;version="!",*</Import-Package>
+                        <Import-Package>${javax.annotation.osgi.version},*</Import-Package>
                     </instructions>
                     <unpackBundle>true</unpackBundle>
                 </configuration>
diff --git a/media/json-jackson/pom.xml b/media/json-jackson/pom.xml
index e205763..d03113c 100644
--- a/media/json-jackson/pom.xml
+++ b/media/json-jackson/pom.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-    Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
 
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v. 2.0, which is available at
@@ -77,7 +77,7 @@
                 <configuration>
                     <instructions>
                         <Export-Package>org.glassfish.jersey.jackson.*</Export-Package>
-                        <Import-Package>javax.annotation.*;version="!",*</Import-Package>
+                        <Import-Package>${javax.annotation.osgi.version},*</Import-Package>
                     </instructions>
                     <unpackBundle>true</unpackBundle>
                 </configuration>
diff --git a/media/json-processing/pom.xml b/media/json-processing/pom.xml
index 696ad7b..762611f 100644
--- a/media/json-processing/pom.xml
+++ b/media/json-processing/pom.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-    Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 2011, 2019 Oracle and/or its affiliates. All rights reserved.
 
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v. 2.0, which is available at
@@ -56,7 +56,7 @@
                         <Export-Package>org.glassfish.jersey.jsonp.*;version=${project.version}</Export-Package>
                         <!-- TODO: change to ${range;[==,+);${jsonp.api.version}} once the version is final-->
                         <Import-Package>
-                            javax.annotation.*;version="!",
+                            ${javax.annotation.osgi.version},
                             javax.json.*;version="[0,2)",
                             org.glassfish.json.*;version="[0,2)",
                             *
diff --git a/media/moxy/pom.xml b/media/moxy/pom.xml
index a91447a..8b2165c 100644
--- a/media/moxy/pom.xml
+++ b/media/moxy/pom.xml
@@ -56,7 +56,7 @@
                 <configuration>
                     <instructions>
                         <Export-Package>org.glassfish.jersey.moxy.*</Export-Package>
-                        <Import-Package>javax.annotation.*;version="!",*</Import-Package>
+                        <Import-Package>${javax.annotation.osgi.version},*</Import-Package>
                     </instructions>
                     <unpackBundle>true</unpackBundle>
                 </configuration>
diff --git a/media/sse/pom.xml b/media/sse/pom.xml
index 13d7b66..19f3d38 100644
--- a/media/sse/pom.xml
+++ b/media/sse/pom.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-    Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
 
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v. 2.0, which is available at
@@ -76,7 +76,7 @@
                 <inherited>true</inherited>
                 <configuration>
                     <instructions>
-                        <Import-Package>javax.annotation.*;version="!",*</Import-Package>
+                        <Import-Package>${javax.annotation.osgi.version},*</Import-Package>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/pom.xml b/pom.xml
index 7f4ec50..7311d11 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2078,6 +2078,7 @@
         <jackson1.version>1.9.13</jackson1.version>
         <jakarta.activation.version>1.2.1</jakarta.activation.version>
         <javassist.version>3.25.0-GA</javassist.version>
+        <javax.annotation.osgi.version>javax.annotation.*;version="[1.2,3)"</javax.annotation.osgi.version>
         <javax.annotation.version>1.3.4</javax.annotation.version>
         <javax.el.version>3.0.2</javax.el.version>
         <javax.el.impl.version>3.0.2</javax.el.impl.version>