Skip to content

Commit f0754eb

Browse files
authored
Fix OSGi headers for CDI & MP Jersey modules to be compatible with EE8 (#5122)
Signed-off-by: jansupol <[email protected]>
1 parent c81fc8f commit f0754eb

File tree

16 files changed

+575
-3
lines changed

16 files changed

+575
-3
lines changed

ext/bean-validation/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
<Export-Package>org.glassfish.jersey.server.validation.*;version=${project.version}</Export-Package>
5858
<Import-Package>
5959
${javax.annotation.osgi.version},
60+
${cdi.osgi.version},
6061
javax.validation.*;resolution:=optional;version="${range;[==,3);${javax.validation.api.version}}",
6162
*
6263
</Import-Package>

ext/cdi/jersey-cdi-rs-inject/pom.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,20 @@
5656
<show>package</show>
5757
</configuration>
5858
</plugin>
59+
<plugin>
60+
<groupId>org.apache.felix</groupId>
61+
<artifactId>maven-bundle-plugin</artifactId>
62+
<inherited>true</inherited>
63+
<extensions>true</extensions>
64+
<configuration>
65+
<instructions>
66+
<Import-Package>
67+
${cdi.osgi.version},
68+
*
69+
</Import-Package>
70+
</instructions>
71+
</configuration>
72+
</plugin>
5973
</plugins>
6074
</build>
6175

ext/cdi/jersey-cdi1x-servlet/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@
9292
<configuration>
9393
<instructions>
9494
<Export-Package>org.glassfish.jersey.ext.cdi1x.servlet.internal</Export-Package>
95+
<Import-Package>
96+
${cdi.osgi.version},
97+
*
98+
</Import-Package>
9599
</instructions>
96100
</configuration>
97101
</plugin>

ext/cdi/jersey-cdi1x-transaction/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@
9191
<configuration>
9292
<instructions>
9393
<Export-Package>org.glassfish.jersey.ext.cdi1x.transaction.internal</Export-Package>
94-
<Import-Package>${javax.annotation.osgi.version},*</Import-Package>
94+
<Import-Package>
95+
${javax.annotation.osgi.version},
96+
${cdi.osgi.version},
97+
*
98+
</Import-Package>
9599
</instructions>
96100
</configuration>
97101
</plugin>

ext/cdi/jersey-cdi1x-validation/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@
103103
<configuration>
104104
<instructions>
105105
<Export-Package>org.glassfish.jersey.ext.cdi1x.validation.internal;version=${project.version}</Export-Package>
106-
<Import-Package>${javax.annotation.osgi.version},*</Import-Package>
106+
<Import-Package>
107+
${javax.annotation.osgi.version},
108+
${cdi.osgi.version},
109+
*
110+
</Import-Package>
107111
</instructions>
108112
</configuration>
109113
</plugin>

ext/cdi/jersey-cdi1x/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
<Import-Package>
8888
${javax.annotation.osgi.version},
8989
${hk2.osgi.version},
90+
${cdi.osgi.version},
9091
*
9192
</Import-Package>
9293
</instructions>

ext/microprofile/mp-rest-client/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@
114114
org.glassfish.jersey.restclient.*;version=${project.version}
115115
</Export-Package>
116116
<Import-Package>
117+
${cdi.osgi.version},
118+
org.eclipse.microprofile.rest.client.*;version="[1,3)",
117119
*
118120
</Import-Package>
119121
</instructions>

incubator/cdi-inject-weld/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@
123123
</Export-Package>
124124
<Import-Package>
125125
sun.misc.*;resolution:=optional,
126-
${jakarta.annotation.osgi.version},
126+
${cdi.osgi.version},
127+
${javax.annotation.osgi.version},
127128
*
128129
</Import-Package>
129130
</instructions>

inject/cdi2-se/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
</Export-Package>
8888
<Import-Package>
8989
sun.misc.*;resolution:=optional,
90+
${cdi.osgi.version},
9091
${javax.annotation.osgi.version},
9192
*
9293
</Import-Package>

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2207,6 +2207,7 @@
22072207
<!-- do not need CQs -->
22082208
<cdi.api.version>1.2</cdi.api.version>
22092209
<cdi2.api.version>2.0.2</cdi2.api.version>
2210+
<cdi.osgi.version>javax.enterprise.*;version="[1,3)"</cdi.osgi.version>
22102211
<ejb.version>3.2.6</ejb.version>
22112212
<gf.impl.version>5.1.0</gf.impl.version>
22122213
<grizzly.client.version>1.16</grizzly.client.version>

0 commit comments

Comments
 (0)