You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2021/11/17 15:48:26 UTC
[brooklyn-dist] 04/04: blacklist bundles which provide things that come from java 1.8
This is an automated email from the ASF dual-hosted git repository.
heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-dist.git
commit 820ce3c2e079cb518d6200370dce1ecb2a05d211
Author: Alex Heneveld <al...@cloudsoftcorp.com>
AuthorDate: Wed Nov 17 15:40:59 2021 +0000
blacklist bundles which provide things that come from java 1.8
prevent duplicate packages; also expose more things from java 1.8
---
karaf/apache-brooklyn/pom.xml | 13 +++++++++++++
karaf/features/src/main/feature/feature.xml | 7 +++++--
.../resources/etc/org.apache.karaf.features.xml | 4 ++++
.../src/main/resources/resources/etc/custom.properties | 7 +++++++
4 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/karaf/apache-brooklyn/pom.xml b/karaf/apache-brooklyn/pom.xml
index 1a35426..190e35c 100755
--- a/karaf/apache-brooklyn/pom.xml
+++ b/karaf/apache-brooklyn/pom.xml
@@ -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>
diff --git a/karaf/features/src/main/feature/feature.xml b/karaf/features/src/main/feature/feature.xml
index adae39e..6fefa70 100644
--- a/karaf/features/src/main/feature/feature.xml
+++ b/karaf/features/src/main/feature/feature.xml
@@ -58,7 +58,7 @@
<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>-->
@@ -66,7 +66,10 @@
<!-- 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}">
diff --git a/karaf/features/src/main/filtered-resources/resources/etc/org.apache.karaf.features.xml b/karaf/features/src/main/filtered-resources/resources/etc/org.apache.karaf.features.xml
index c1dce87..fbd9af9 100644
--- a/karaf/features/src/main/filtered-resources/resources/etc/org.apache.karaf.features.xml
+++ b/karaf/features/src/main/filtered-resources/resources/etc/org.apache.karaf.features.xml
@@ -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 -->
diff --git a/karaf/features/src/main/resources/resources/etc/custom.properties b/karaf/features/src/main/resources/resources/etc/custom.properties
index 4ac5545..e5aca93 100644
--- a/karaf/features/src/main/resources/resources/etc/custom.properties
+++ b/karaf/features/src/main/resources/resources/etc/custom.properties
@@ -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", \