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:22 UTC

[brooklyn-dist] branch master updated (50b6ef4 -> 820ce3c)

This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-dist.git.


    from 50b6ef4  This closes #179
     new 452731c  fix kubernetes osgi import, fix osgi package confusion, tidy features
     new 34769d1  use jakarta for ws.rs-api
     new 428aa4d  remove bogus mvn repos file
     new 820ce3c  blacklist bundles which provide things that come from java 1.8

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 karaf/apache-brooklyn/pom.xml                      | 13 ++++++
 karaf/features/src/main/feature/feature.xml        |  7 ++-
 .../resources/etc/org.apache.karaf.features.xml    | 50 ++++++++++++++++++----
 .../main/resources/resources/etc/custom.properties |  7 +++
 .../etc/org.ops4j.pax.url.mvn.repositories.cfg     | 20 ---------
 5 files changed, 67 insertions(+), 30 deletions(-)
 delete mode 100644 karaf/features/src/main/resources/resources/etc/org.ops4j.pax.url.mvn.repositories.cfg

[brooklyn-dist] 03/04: remove bogus mvn repos file

Posted by he...@apache.org.
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 428aa4d485823f284f79813e2bc6267bfd480133
Author: Alex Heneveld <al...@cloudsoftcorp.com>
AuthorDate: Wed Nov 17 15:03:08 2021 +0000

    remove bogus mvn repos file
    
    doesn't seem to be used; value comes from the mvn.cfg file
---
 .../etc/org.ops4j.pax.url.mvn.repositories.cfg       | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/karaf/features/src/main/resources/resources/etc/org.ops4j.pax.url.mvn.repositories.cfg b/karaf/features/src/main/resources/resources/etc/org.ops4j.pax.url.mvn.repositories.cfg
deleted file mode 100644
index b7bc8c9..0000000
--- a/karaf/features/src/main/resources/resources/etc/org.ops4j.pax.url.mvn.repositories.cfg
+++ /dev/null
@@ -1,20 +0,0 @@
-################################################################################
-#
-#    Licensed to the Apache Software Foundation (ASF) under one or more
-#    contributor license agreements.  See the NOTICE file distributed with
-#    this work for additional information regarding copyright ownership.
-#    The ASF licenses this file to You under the Apache License, Version 2.0
-#    (the "License"); you may not use this file except in compliance with
-#    the License.  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-################################################################################
-
-org.ops4j.pax.url.mvn.repositories=+http://repo1.maven.org/maven2

[brooklyn-dist] 04/04: blacklist bundles which provide things that come from java 1.8

Posted by he...@apache.org.
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", \

[brooklyn-dist] 02/04: use jakarta for ws.rs-api

Posted by he...@apache.org.
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 34769d1ecc449883f4b15700faee3e27e562e8c7
Author: Alex Heneveld <al...@cloudsoftcorp.com>
AuthorDate: Wed Nov 17 15:02:30 2021 +0000

    use jakarta for ws.rs-api
    
    this has better osgi verisoning info
    (also is newer)
---
 .../resources/etc/org.apache.karaf.features.xml    | 46 ++++++++++++++--------
 1 file changed, 30 insertions(+), 16 deletions(-)

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 e8062a6..c1dce87 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
@@ -101,7 +101,7 @@
 
         <!-- Others discovered by looking at the build -->
 
-        <!-- Guava SHOULD have two versions as Swagger is more recent than what jclouds supports
+        <!-- Guava might need tidy-up between jclouds and swagger; but at the moment is okay
         <bundle originalUri="mvn:com.google.guava/guava/[18.0, 27.0.1-jre]" ... />
         -->
 
@@ -109,8 +109,13 @@
         <bundle originalUri="mvn:javax.mail/mail/[1.4.4,${javax.mail.version}]"
                 replacement="mvn:javax.mail/mail/${javax.mail.version}" />
 
-        <bundle originalUri="mvn:javax.ws.rs/javax.ws.rs-api/[2,${jax-rs-api.version}]"
-                replacement="mvn:javax.ws.rs/javax.ws.rs-api/${jax-rs-api.version}" />
+        <!-- cxf uses servicemix's variant; other use javax standard one; but jakarta is better; note some cheat and v2.1.1 exports as 2.1.99.b01 -->
+        <bundle originalUri="mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxrs-api-2.1/[0,999]"
+                replacement="mvn:jakarta.ws.rs/jakarta.ws.rs-api/${jax-rs-api.version}" />
+        <bundle originalUri="mvn:javax.ws.rs/javax.ws.rs-api/[0,999]" 
+                replacement="mvn:jakarta.ws.rs/jakarta.ws.rs-api/${jax-rs-api.version}" />
+        <bundle originalUri="mvn:jakarta.ws.rs/jakarta.ws.rs-api/[0,999]" 
+                replacement="mvn:jakarta.ws.rs/jakarta.ws.rs-api/${jax-rs-api.version}" />
 
         <bundle originalUri="mvn:org.apache.httpcomponents/httpcore-osgi/[4.4,${httpcomponents.httpcore.version}]"
                 replacement="mvn:org.apache.httpcomponents/httpcore-osgi/${httpcomponents.httpcore.version}" />
@@ -173,12 +178,11 @@
                 replacement="mvn:org.eclipse.jetty/jetty-webapp/${jetty.version}" />
         <bundle originalUri="mvn:org.eclipse.jetty/jetty-xml/[9.4,${jetty.version}]"
                 replacement="mvn:org.eclipse.jetty/jetty-xml/${jetty.version}" />
-        <bundle originalUri="mvn:org.XXXapache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/[1.2,${spifly.version})"
-                replacement="mvn:org.XXXapache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/${spifly.version}" />
 
-        <!-- cxf uses servicemix's variant; other use javax standard one -->
-        <bundle originalUri="mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxrs-api-2.1/(0,3)"
-                replacement="mvn:javax.ws.rs/javax.ws.rs-api/${jax-rs-api.version}" />
+        <!-- this would be nice, but without it we get missing requirement [org.eclipse.jetty.security.jaspi/...]
+        <bundle originalUri="mvn:org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/[1.2,${spifly.version}]"
+                replacement="mvn:org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/${spifly.version}" />
+        -->
 
         <!-- the objectweb (dis)assembly jars are usually needed at multiple major version levels;
              see brooklyn-server/pom.xml for discussion; no choice but to allow the multiple versions,
@@ -212,11 +216,26 @@
         <bundle>mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/[2.10,${fasterxml.jackson.version})</bundle>
         <bundle>mvn:javax.mail/mail/[1.4.4,${javax.mail.version})</bundle>
 
-        <bundle>mvn:javax.ws.rs/javax.ws.rs-api/[2,${jax-rs-api.version})</bundle>
-        <bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxrs-api-2.1/[0,3)</bundle> <!-- use javax above -->
+        <bundle>mvn:javax.annotation/javax.annotation-api/[0,999]</bundle> <!-- use jakarta, per above -->
+        <bundle>mvn:com.google.code.findbugs/jsr305/[0,999]</bundle> <!-- use servicemix, or just exclude -->
+        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsr305/[0,999]</bundle>  <!-- just exclude, not needed, confuses with standard javax.annotation package from jakarta -->
+
+        <bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/[0,999]</bundle> <!-- use jakarta -->
+
+        <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 -->
+        <bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxrs-api-2.1/[0,999]</bundle> <!-- use javax above -->
+
+        <!-- we supply wrapped versions -->
+        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okhttp/3.12.1_1</bundle>
+        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okio/1.15.0_1</bundle>
+
+        <!-- <bundle>mvn:org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/[1.2,${spifly.version})</bundle> --> <!-- see spifly above -->
 
         <!-- Blacklisted bundles must be pulled in elsewhere at the correct version.
-             This might mean explicit dependencies declared in a feature. -->
+             Note that replacements might need blacklisting also.
+             To be safe sometimes we rely on explicit dependencies declared in a feature. -->
 
         <bundle>mvn:org.apache.httpcomponents/httpcore-osgi/[4.4,${httpcomponents.httpcore.version})</bundle>
         <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jzlib/[1,${jzlib.osgi.version})</bundle>
@@ -248,11 +267,6 @@
         <bundle>mvn:org.eclipse.jetty/jetty-webapp/[9.4,${jetty.version})</bundle>
         <bundle>mvn:org.eclipse.jetty/jetty-xml/[9.4,${jetty.version})</bundle>
 
-        <!-- we supply wrapped versions -->
-        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okhttp/3.12.1_1</bundle>
-        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okio/1.15.0_1</bundle>
-        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsr305/(0,999]</bundle>
-
     </blacklistedBundles>
 
 </featuresProcessing>

[brooklyn-dist] 01/04: fix kubernetes osgi import, fix osgi package confusion, tidy features

Posted by he...@apache.org.
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 452731cd8b44b66ed8c0a451664314eed128ffc0
Author: Alex Heneveld <al...@cloudsoftcorp.com>
AuthorDate: Wed Nov 17 12:32:58 2021 +0000

    fix kubernetes osgi import, fix osgi package confusion, tidy features
    
    declare fewer things as dependency=true to speed up startup and make things (eg guava) available when needed;
    some things still declared as dependency=true are needed to prevent confusion though
    
    also take care to minimize confusion of packages vis-a-vis javax.annotation, ws, and rs-api
    
    seems to be working!
---
 .../resources/etc/org.apache.karaf.features.xml    | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

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 e147bc5..e8062a6 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
@@ -58,9 +58,12 @@
        - https://stackoverflow.com/a/53589206
     -->
     <bundleReplacements>
-        <!-- Several things declare javax for annotation-api, but jakarta replaces those; having just one speeds up dependency resolution -->
-        <bundle originalUri="mvn:javax.annotation/javax.annotation-api/[1.3,1.4)"
+        <!-- JSR305 complements javax.annotation with more classes in same package and new subpackages eg meta;
+             both have multiple providers; we have standardized on the replacements below -->
+        <bundle originalUri="mvn:javax.annotation/javax.annotation-api/(0,999]"
                 replacement="mvn:jakarta.annotation/jakarta.annotation-api/${jakarta.annotation-api.version}" />
+        <bundle originalUri="mvn:com.google.code.findbugs/jsr305/(0,999]"
+                replacement="mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsr305/${jsr305.bundle.version}" />
 
         <!-- For crypto, both the karaf ssh feature and jclouds use lower versions than we want;
              (some lower versions may have CVEs, and in any case it is preferable to have one version where compatible) -->
@@ -170,6 +173,12 @@
                 replacement="mvn:org.eclipse.jetty/jetty-webapp/${jetty.version}" />
         <bundle originalUri="mvn:org.eclipse.jetty/jetty-xml/[9.4,${jetty.version}]"
                 replacement="mvn:org.eclipse.jetty/jetty-xml/${jetty.version}" />
+        <bundle originalUri="mvn:org.XXXapache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/[1.2,${spifly.version})"
+                replacement="mvn:org.XXXapache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/${spifly.version}" />
+
+        <!-- cxf uses servicemix's variant; other use javax standard one -->
+        <bundle originalUri="mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxrs-api-2.1/(0,3)"
+                replacement="mvn:javax.ws.rs/javax.ws.rs-api/${jax-rs-api.version}" />
 
         <!-- the objectweb (dis)assembly jars are usually needed at multiple major version levels;
              see brooklyn-server/pom.xml for discussion; no choice but to allow the multiple versions,
@@ -189,7 +198,6 @@
     </bundleReplacements>
 
     <blacklistedBundles>
-        <bundle>mvn:javax.annotation/javax.annotation-api/[1.3,1.4)</bundle>
         <bundle>mvn:org.bouncycastle/bcprov-jdk15on/[1.51,${bouncycastle.version})</bundle>
         <bundle>mvn:org.bouncycastle/bcprov-ext-jdk15on/[1.51,${bouncycastle.version})</bundle>
         <bundle>mvn:org.bouncycastle/bcpkix-jdk15on/[1.51,${bouncycastle.version})</bundle>
@@ -203,7 +211,9 @@
         <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/[2.10,${fasterxml.jackson.version})</bundle>
         <bundle>mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/[2.10,${fasterxml.jackson.version})</bundle>
         <bundle>mvn:javax.mail/mail/[1.4.4,${javax.mail.version})</bundle>
+
         <bundle>mvn:javax.ws.rs/javax.ws.rs-api/[2,${jax-rs-api.version})</bundle>
+        <bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxrs-api-2.1/[0,3)</bundle> <!-- use javax above -->
 
         <!-- Blacklisted bundles must be pulled in elsewhere at the correct version.
              This might mean explicit dependencies declared in a feature. -->
@@ -237,6 +247,12 @@
         <bundle>mvn:org.eclipse.jetty/jetty-util/[9.4,${jetty.version})</bundle>
         <bundle>mvn:org.eclipse.jetty/jetty-webapp/[9.4,${jetty.version})</bundle>
         <bundle>mvn:org.eclipse.jetty/jetty-xml/[9.4,${jetty.version})</bundle>
+
+        <!-- we supply wrapped versions -->
+        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okhttp/3.12.1_1</bundle>
+        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okio/1.15.0_1</bundle>
+        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsr305/(0,999]</bundle>
+
     </blacklistedBundles>
 
 </featuresProcessing>