This is an automated email from the ASF dual-hosted git repository. amichai pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/aries-rsa.git
commit a0a1071ece4a5e19ee11a9671a1bed8e5f8f784f Author: Amichai Rothman <[email protected]> AuthorDate: Sun Jun 2 17:31:22 2024 +0300 ARIES-2016 Upgrade Zookeeper to 3.9.1 --- discovery/zookeeper/bnd.bnd | 20 +++++++++ discovery/zookeeper/pom.xml | 12 +++++- .../zookeeper/server/ZookeeperStarter.java | 1 + features/src/main/resources/features.xml | 2 +- itests/felix/pom.xml | 47 +++++++++++++++++++++- .../apache/aries/rsa/itests/felix/RsaTestBase.java | 19 +++++++-- parent/pom.xml | 23 +++++++++-- 7 files changed, 112 insertions(+), 12 deletions(-) diff --git a/discovery/zookeeper/bnd.bnd b/discovery/zookeeper/bnd.bnd new file mode 100644 index 00000000..e8cf8f7c --- /dev/null +++ b/discovery/zookeeper/bnd.bnd @@ -0,0 +1,20 @@ + +# 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. +Import-Package: \ + org.apache.zookeeper.metrics.impl;resolution:=optional,\ + * diff --git a/discovery/zookeeper/pom.xml b/discovery/zookeeper/pom.xml index 00bbf29d..82dd8669 100644 --- a/discovery/zookeeper/pom.xml +++ b/discovery/zookeeper/pom.xml @@ -43,8 +43,8 @@ <scope>provided</scope> </dependency> <dependency> - <groupId>org.apache.zookeeper</groupId> - <artifactId>zookeeper</artifactId> + <groupId>org.apache.servicemix.bundles</groupId> + <artifactId>org.apache.servicemix.bundles.zookeeper</artifactId> <exclusions> <exclusion> <groupId>com.sun.jdmk</groupId> @@ -76,6 +76,14 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>io.dropwizard.metrics</groupId> + <artifactId>metrics-core</artifactId> + </dependency> + <dependency> + <groupId>org.xerial.snappy</groupId> + <artifactId>snappy-java</artifactId> + </dependency> <dependency> <groupId>org.apache.aries.rsa.discovery</groupId> <artifactId>org.apache.aries.rsa.discovery.local</artifactId> diff --git a/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/server/ZookeeperStarter.java b/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/server/ZookeeperStarter.java index 893a449e..7c7fb20c 100644 --- a/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/server/ZookeeperStarter.java +++ b/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/server/ZookeeperStarter.java @@ -82,6 +82,7 @@ public class ZookeeperStarter { zkMainThread = new Thread(new Runnable() { public void run() { try { + Thread.currentThread().setContextClassLoader(ZookeeperStarter.class.getClassLoader()); server.startup(); } catch (Throwable e) { LOG.error("Problem running ZooKeeper server.", e); diff --git a/features/src/main/resources/features.xml b/features/src/main/resources/features.xml index abb5d84e..d73f643f 100644 --- a/features/src/main/resources/features.xml +++ b/features/src/main/resources/features.xml @@ -53,7 +53,7 @@ <feature name="aries-rsa-discovery-zookeeper" version="${project.version}"> <feature>aries-rsa-core</feature> - <bundle>mvn:org.apache.zookeeper/zookeeper/${zookeeper.version}</bundle> + <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.zookeeper/${zookeeper.version}</bundle> <bundle>mvn:org.apache.aries.rsa.discovery/org.apache.aries.rsa.discovery.local/${project.version}</bundle> <bundle>mvn:org.apache.aries.rsa.discovery/org.apache.aries.rsa.discovery.zookeeper/${project.version}</bundle> diff --git a/itests/felix/pom.xml b/itests/felix/pom.xml index bd70c741..f7ac689b 100644 --- a/itests/felix/pom.xml +++ b/itests/felix/pom.xml @@ -127,6 +127,49 @@ <artifactId>org.apache.aries.rsa.discovery.zookeeper</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>io.dropwizard.metrics</groupId> + <artifactId>metrics-core</artifactId> + </dependency> + <dependency> + <groupId>org.xerial.snappy</groupId> + <artifactId>snappy-java</artifactId> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-handler</artifactId> + <version>${netty.version}</version> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-buffer</artifactId> + <version>${netty.version}</version> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-transport</artifactId> + <version>${netty.version}</version> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-common</artifactId> + <version>${netty.version}</version> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-resolver</artifactId> + <version>${netty.version}</version> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-transport-native-unix-common</artifactId> + <version>${netty.version}</version> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-codec</artifactId> + <version>${netty.version}</version> + </dependency> <dependency> <groupId>org.apache.aries.rsa.provider</groupId> <artifactId>org.apache.aries.rsa.provider.tcp</artifactId> @@ -205,8 +248,8 @@ </dependency> <dependency> - <groupId>org.apache.zookeeper</groupId> - <artifactId>zookeeper</artifactId> + <groupId>org.apache.servicemix.bundles</groupId> + <artifactId>org.apache.servicemix.bundles.zookeeper</artifactId> <scope>test</scope> </dependency> </dependencies> diff --git a/itests/felix/src/test/java/org/apache/aries/rsa/itests/felix/RsaTestBase.java b/itests/felix/src/test/java/org/apache/aries/rsa/itests/felix/RsaTestBase.java index 74f3c0d8..a6da0542 100644 --- a/itests/felix/src/test/java/org/apache/aries/rsa/itests/felix/RsaTestBase.java +++ b/itests/felix/src/test/java/org/apache/aries/rsa/itests/felix/RsaTestBase.java @@ -163,7 +163,16 @@ public class RsaTestBase { } protected static Option rsaDiscoveryZookeeper() { - return composite(mvn("org.apache.zookeeper", "zookeeper"), + return composite(mvn("io.netty", "netty-handler"), + mvn("io.netty", "netty-buffer"), + mvn("io.netty", "netty-transport"), + mvn("io.netty", "netty-common"), + mvn("io.netty", "netty-resolver"), + mvn("io.netty", "netty-transport-native-unix-common"), + mvn("io.netty", "netty-codec"), + mvn("io.dropwizard.metrics", "metrics-core"), + mvn("org.xerial.snappy", "snappy-java"), + mvn("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.zookeeper"), mvn("org.apache.aries.rsa.discovery", "org.apache.aries.rsa.discovery.zookeeper")); } @@ -184,9 +193,11 @@ public class RsaTestBase { } protected static Option configZKServer() { - return newConfiguration("org.apache.aries.rsa.discovery.zookeeper.server") // - .put("clientPort", ZK_PORT) // - .asOption(); + return composite( + newConfiguration("org.apache.aries.rsa.discovery.zookeeper.server") // + .put("clientPort", ZK_PORT) // + .asOption(), + systemProperty("zookeeper.admin.enableServer").value("false")); } protected static Option configFastBinPort(int port) { diff --git a/parent/pom.xml b/parent/pom.xml index ac6e8707..6cd9abc4 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -34,7 +34,8 @@ <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <bnd.version>6.4.0</bnd.version> - <zookeeper.version>3.4.14</zookeeper.version> + <zookeeper.version>3.9.1_1</zookeeper.version> + <netty.version>4.1.101.Final</netty.version> <slf4j.version>2.0.13</slf4j.version> <hawtdispatch.version>1.22</hawtdispatch.version> <hawtbuf.version>1.11</hawtbuf.version> @@ -173,8 +174,8 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.apache.zookeeper</groupId> - <artifactId>zookeeper</artifactId> + <groupId>org.apache.servicemix.bundles</groupId> + <artifactId>org.apache.servicemix.bundles.zookeeper</artifactId> <version>${zookeeper.version}</version> <exclusions> <exclusion> @@ -207,6 +208,22 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>io.dropwizard.metrics</groupId> + <artifactId>metrics-core</artifactId> + <version>4.2.25</version> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.xerial.snappy</groupId> + <artifactId>snappy-java</artifactId> + <version>1.1.10.5</version> + </dependency> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.converter</artifactId>
