Skip to content
Permalink
Browse files
blacklist bundles which provide things that come from java 1.8
prevent duplicate packages; also expose more things from java 1.8
  • Loading branch information
ahgittin committed Nov 17, 2021
1 parent 428aa4d commit 820ce3c2e079cb518d6200370dce1ecb2a05d211
Showing 4 changed files with 29 additions and 2 deletions.
@@ -70,6 +70,19 @@
<version>${project.version}</version>
</dependency>

<!-- not needed if coming from jre, and doesn't work if not from jre
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
-->
<!-- only for java 9+
<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</dependency>
-->

<dependency>
<groupId>org.apache.brooklyn</groupId>
<artifactId>brooklyn-dist-features</artifactId>
@@ -58,15 +58,18 @@
<feature name="brooklyn-startup-features" version="${project.version}" description="Bundles to load early">
<!-- this might not be needed as a separate feature anymore; the load order has changed -->

<!-- use jakarta not servicemix -->
<!-- use jakarta not servicemix or javax -->
<bundle dependency="true">mvn:com.sun.activation/jakarta.activation/${jakarta.activation.version}</bundle>
<!-- <bundle dependency="true">mvn:org.apache.servicemix.specs.activation-api-1.1</bundle>-->
<!-- <bundle dependency="true">mvn:org.apache.servicemix.specs.activation-api-1.1/2.9.0</bundle>-->

<!-- Register javax.mail along with pax-logging-service so it doesn't get refreshed later -->
<bundle dependency="true">mvn:javax.mail/mail/${javax.mail.version}</bundle>

<bundle dependency="true">mvn:jakarta.annotation/jakarta.annotation-api/${jakarta.annotation-api.version}</bundle>
<bundle>mvn:jakarta.annotation/jakarta.annotation-api/${jakarta.annotation-api.version}</bundle>
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsr305/${jsr305.bundle.version}</bundle> <!-- complementary to above, but split packages; excluded by karaf.features.xml as not needed, confuses things -->
<bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/2.9.0</bundle> <!-- used by cxf, provides javax.xml.ws... -->
<bundle>mvn:jakarta.xml.bind/jakarta.xml.bind-api/${jakarta.xml.bind-api.version}</bundle> <!-- preferred over servicemix jaxb (identical) -->
</feature>

<feature name="brooklyn-config" version="${project.version}">
@@ -222,6 +222,10 @@

<bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/[0,999]</bundle> <!-- use jakarta -->

<!-- use the packages from java 1.8, prevent duplicates -->
<bundle>mvn:jakarta.xml.bind/jakarta.xml.bind-api/${jakarta.xml.bind-api.version}</bundle>
<bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/2.9.0</bundle>

<bundle>mvn:jakarta.ws.rs/jakarta.ws.rs-api/[0,${jax-rs-api.version})</bundle> <!-- use right version -->
<bundle>mvn:jakarta.ws.rs/jakarta.ws.rs-api/(${jax-rs-api.version},999]</bundle> <!-- exclude 2.1.99 -->
<bundle>mvn:javax.ws.rs/javax.ws.rs-api/[0,999]</bundle> <!-- use jakarta above -->
@@ -25,6 +25,11 @@
# Brooklyn used to bundle Apache Felix, so force felix
karaf.framework=felix

# javax.xml.bind -- could come from jakarta.xml.bind-api
# javax.xml.ws -- could come from servicemix jaxws
# javax.activation -- could be declared, if using jakarta's bind
# but karaf gets unhappy if we try to use those instead of the java 1.8-supplied ones

jre-1.8= \
javax.accessibility, \
javax.activity, \
@@ -131,7 +136,9 @@ jre-1.8= \
javax.xml.validation, \
javax.xml.ws;version="2.2", \
javax.xml.ws.handler;version="2.2", \
javax.xml.ws.handler.soap;version="2.2", \
javax.xml.ws.http;version="2.2", \
javax.xml.ws.soap;version="2.2", \
javax.xml.ws.spi;version="2.2", \
javax.xml.ws.wsaddressing;version="2.2", \
javax.xml.ws.spi.http;version="2.2", \

0 comments on commit 820ce3c

Please sign in to comment.